Fixed spacing of if statements to improve readability of the code.

This commit improves the readability of the code by providing consistent formatting for the if statements, so that they can be better followed by the eye.