Correct output order. Network gateways must output first

Also did a :retab to clean up the mix of tabs and spaces