minor changes to add support for end-of-line and such