Removed inefficient environment manipulation functions