Extract environment setup.