Move 'if' statements to a single line