some cleanup in proxy.js