Added some operations and refactorings (again without tests).