Introduced mutation observer for watching for DOM changes