Remove useless state change in lexer.
Remove unused dynamic? and used? from Environment.