small bugfixes and code clean up;
Merge branch 'feature/remove-environment-requirement'