refactor of dirty management.
completed implementation of DirtyHelper
removed old dirty management.