Refactored link creation and retrieval into LinkService.