Added support for add/remove instance at runtime.