move lexer to own module