More refactoring.

The likely easiest way to do proper unit testing with screenshot is to inject a
plugin in the test case. This is far from being implemented.

DockingFloating drawing is still broken.