Cleaning up code.
Fixes for eol/eof parsing.