Remove unnecessary if statments