Proxy cleanups

A few commits to clean up proxy code in prep for ip-per-service.