Issue 21 with proxy

Please review new changes.