Extract functions for accessing the environment.