Updated Evnironment handling