Classes and functions for querying the environment.