Fixed curly braces in conditional statements and indentions