add proxy2 and minor cleanup
Merge pull request #2083 from dimagi/proxy2

add proxy2 and minor cleanup