Added working proxy code, corresponding test