     # refer to the `node-http-proxy` library for info on the proxy.
     # Also see `makeForward` method for details on load balancing!
     startupHttpsMaster: ->
-        assert _.isArray @queueOfHttps ?= new Array
+        assert _.isArray q = @queueOfHttps ?= Array()
         assert _.isObject options = @resolveSslDetails()
         assert _.isString host = nconf.get "master:host"
         assert _.isNumber port = nconf.get "master:https"
         cmp = (exm) -> (srv) -> exm.uuid is srv.uuid or 0
         remove = (srv) => _.remove @queueOfHttps, cmp(srv)
-        assert upgrade = @makeUpgraders @queueOfHttp, "https"
-        assert registr = @makeRegistrar @queueOfHttps, "https"
-        assert forward = @makeForwarder @queueOfHttps, "https"
+        assert registr = @makeRegistrar q, "http", null
+        assert selectr = @makeSelectors q, "http", null
+        assert forward = @makeForwarder q, "http", selectr
+        assert upgrade = @makeUpgraders q, "http", selectr
         @secureProxy = https.createServer options, forward
         assert @secureProxy; @secureProxy.listen port, host
         @secureProxy.on "upgrade", -> upgrade arguments...

        assert _.isArray(queue), "got invalid proxy queue"
        response.writeHead 504, reason if _.isEmpty queue
        return response.end(msg) and no if _.isEmpty queue
        assert proxy = queue.shift(); queue.push proxy
        a = "#{proxy.target.host}:#{proxy.target.port}"
        assert a = "#{a.toLowerCase().underline.yellow}"
        logger.debug "Proxy %s request %s to %s", x, u, a

            res.writeHead 500, "a proxy backend error"
            res.end format msg, err.toString(); this

    makeSelectors: (queue, kind) -> (request, response) =>
        proxy = queue.shift()
        assert _.isObject proxy
        num = queue.push proxy
        assert num > 0; proxy

    # This is a factory method that produces request forwarders.
    # These are directly responsible for proxying an HTTP request
    # from the master server (frontend) to actual server (backend)
    # that does the job of handling the request. The forwarder is
    # also responsible for rotating (round-robin) servers queue!
    makeForwarder: (queue, kind, select) -> (request, response) =>
        encrypted = request.connection.encrypted
        assert u = "#{request.url}".underline.yellow
        assert x = (encrypted and "HTTPS" or "HTTP").bold
