Revert if statements when then clause is empty
Removed unnecessary casts from divisions