Refactored, 2 if clauses removed