Began refactoring lexer code into separate module.