Added support for an optional port number in the host parameter