Some code cleanup for proxy.php

Signed-off-by: Shitiz Garg <mail@dragooon.net>