Neaten up the code to get a run's resource links.