Extract sidebar logic into smaller classes.
Dump remaining.