Updated objectmanager to use maps