More Fixes/cleanup on single port programs.

Should have a number of bugs hammered out now, and thus be useable. Have
not tested for scaling, as I can only do one client/server with single
ports. Still very likely bugs in the code which have not yet been found.