refactor / simplify lexer