Move env vars to environment and environment_test

@mwall almost done I promise.