Moved completed lex code to lexer.js from testing file