fix trial environment values and retain values of treatment factors after reducing level
Merge branch 'master' of https://github.com/digitalabs/Fieldbook