Refactor __add and __mul.