causes various issues.
We should really be using sinon in some way here.
- getExpandedSections has side effects (updates local storage)
- Really this code should be refactored. The toggle code is now horribly unreadable. We should think about giving it a complete rewrite, maybe making use of Page.