Refactor proxy