Flattened the lexer so that all the individual state functions are top-level. Added the inFile as a parameter passed around between the functions.