Refactor Lexer submodules