Tidy up

Added brackets to IF statements. Ensure we're tabbing from the left.