Clean up references file