Added environment functions.