Refactor into an identity adapter proxy with no monkey patching