Cleans up some lexing logic