Feature/refactoring

Many changes to the codebase to make it more resilient and readable:

* Simplified/improved logic in some configuration handlers
* Added whitespace around starting/ending statements for blocks
* Made all code comments lowercase for consistency

I welcome your feedback, @Tyilo.