cleaned up topology_rest.py and add loadbalancer function