Formatted with better indentation

Clearer overview for some pieces of code