Refactory in REST server MUX