Cleanup legend