Round of optimizations

@iSerge , please, double check `readByte` optimization.