Added docs and tests to Environment