reference clean up.