Refactoring ItemDelete and OnlineResourceManager.