Move common env stuff to environment.rb