Reordering of the order the functions are called

Calling the slowest first so the content from network_usage_table is
rendered before get ips are called to insert it in the table