Improvment: Update view affected only.

It should not rewrite all views whenever a state changed. Now rewrites view as less it it should to be.