Clean projection writer
Improve IsDirty logic