Minor style issue but all if statements should really have braces.