[WIP] Merge the refactoring-branch into master

I think we should merge the `refactoring`-branch into master.

This pull request can be used to track the changes; it is therefore currently not ready to be merged.

Before merging I propose to clean up the commit history and have another quick glance through the single files whether we could add some polish here and there. I also think we should line out what changed in the refactoring branch. 

I volunteer for these jobs.

As cleanung up the commit history is likely to involve `git push --force`, this will possibly destroy other peoples ability to simply upgrade their `refactoring`-branches. I don't think that this is a problem.