Multi-instance capability

Adds the capability of running several instances of a hub (deals with the processing working correctly). Fixes #696