Safer update and refactor uninstall