Refactor proxy stuff.