Futher refactoring to byteio