Reference clean up