How to clean code

Now with 110% more curly braces on their own lines!