Fixing a bug where MutationObserver was attached couple of times. Other small fixes.