Variable misnamed and missing config environment attribute bug

* Bugfix: cs variable is most likely cf
* Bugfix: If config file loads but no entry for the environment exists, code crashes
* Double variable declaration