Overhaul to centralize environment management (among other things)

I don't expect you to like it, but you may want to consider this approach environment clean-up.