Added more 'const', and changed stats to %u