Make the lexer more standards compiant, fix bugs.