Tidying up code, playing with different ‘if’ formats