Created setEnvironment method on application