Added an environment domain switching mechanism and updated documentation