Clean up refdes