Added some environment helper functions