Fixed and simplified the behavior of the right sidebar. Fixes #116.