Added InstanceManager class.