Fixes #89
Also did a complete reformatting of the project, based on some formatting rules that has also been added to the project as "Our CleanUp".
Merge pull request #98 from SW2A305/Bugfixes

Fixes #89