Merge in port allocation fixes (#72), which is the first step in completely addressing Issue #57.