Pass connector directly to connect() instead of using name.
Rename "modules" to "domains" to prevent confusion with node/require modules.