Bug 27261 - Added global environment, cleaned up.