Switched declarations to use a switch statement, as well as a couple of other minor changes in the lexer.