Finish adapting the code to Reader without peek()

This could use some refactoring
clean up a bit