Adding legend, cleaning up transitions.