Document the helpers in env and changed API and behavior of those functions to be more friendly.