Refactor the whole Lexer