Edit KdbEntry: track dirty state
code cleanup
Code cleanup