WIP: basic dirty checking implementation