refactored common code on client for removing model objects