Version 2.2 - sorts unique ports in order.