Changes to make master server keep track of ports.