Changed spacing of if statements for readibility