Big changes to proxy management script.