refactoring + fix content script injection on update