refactor hypermedia link inclusion