Cleaning up state link refs