Remove unused if statements