ENV variable
fixes
remove func
fix caught exceptions
refactor a bit
Merge branch 'master' into pr/756
This was already added.