Refactor links in the head