Some cleaning, improved proxy code.