Refactored nx-connection to use a global map of client instances.