Added support for command line port.
TODO updated.