code review
cleaned up the dirtying logic
removed restyledamage