Implemented support for multiple instances of API in one process.