references clean up