Refactor binary op rules a bit.