Made environment loading simpler and more flexible.