Add various glue functions for manipulating proxy handlers. Remove the d...

...ebug ifdefs now that the problems no longer appears.