Refactor into LinkRepository