Pull out the env code