added mechanism to postpone dom modifications. class and innerhtml changes are now bulk applied when applyChanged is called.