fixed miss-wiring in env params
implement rendering perf improvements

Hat tip to Dane Springmeyer