Added peek(), updated check_eof()
Merge branch 'peek'