Refactoring: removing mutation observer