Added dirty tracking code to see state