Stabilized sidebar after merging in refactor.

Lots of changes and lots more to come in the functionality of the
sidebar. This is currently just a stable prototype.