This MR fixes #17 (closed) and additionally introduces some small code changes by refactoring a bit of code to use the recently introduced enviroment variable