Remove unnecessary if statements