refactored the generation of the page links in the Link header