Support custom host name. Refactor how commands are sent to remote controller.