changes and cleanup for update/uninstall scenario