Moving the isDirty logic to point to the controller Fixes #1