Turns out that we don't even have unit tests for this view. And I'm not sure even how to begin testing this kind of chained CSS animation.  So I fixed the nesting depth issues, but am leaving the nested functions as they are for now.