Refactor row scrubbing and add transaction callbacks to the plugin interface