Automatic code formatting of main code

Now the code looks like one piece again.
(also asked jenkie if it's ok)

The change looks pretty harmless
if you "ignore space changes".
Automatic code formatting of misc code