Load balancing working

Final working version
Simple sorting algorithm for choosing the correct gateway
Updated port addresses