Remove some unnecessary if statements