Added Proxy encoding + tests.