Refactored operators, added add tests.