Switched the global environment to be a hashmap from Ids. Added prettyId