clean up code and test with new proxy