Refactor: store hook repository in a local rather than re-fetch in loop.