More refactoring out of fixed 1234 port number and move to dynamic port number.