Tidy up references.