Move deleteCollectionIfNotUsed() method to collection's controller.