move newline handling to its own state
clarify handling of newlines
Make messages more helpful
Add support for classes