Remove duplication between finding one and many free TCP ports