Fixed up-level, added top-level, fixed leave, and fixed case where the only option is not the sidebar.