Modify operations were broken, but now aren't. This version fixes the changes cleanly.
Made modify_ops a method to allow for unit testing of it. Added unit tests for add, delete and replace.