Added cross machine capabilities by allowing hostname and port to be specified