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