Refactor EntityResolver*