Fixed formatting and indenting throughout