Took the main function out of lex.c, as lex.c is more of a library