Updated documentation and refactored some lexer components.