Refactored objectmanager.