Fixes after refactoring for jsonpatch and unittests.