refactored resources out of the environment