Add and remove object from allObjects.