clean up and simplied the lexer