Fixed threading issue with Environment, some progress on orienting based on gravity (still a work in progress).