move some lexer stuff into its own file