Added dirty editor tracking and a warning before user leaves the page with unsaved changes