Restructured proxy.c. I took out the parts only used for testing and put them into the functiontest.c file I am using to test code.