Code cleanup and Additon of Env to the default configuration.