Tidy up the references