Set up host and port on command line.

Removed some dead code.