Remove cruft from ~
Allow different port numbers