Let's try to uncrustify the files a bit. I think the chaos coding standards are a bit outdated; we should have a little bit more space in some places and less elsewhere. :) I also added some more usage of the auto keyword.
More minor improvements.