Added a method for saving operations and new tests.