More sidebar refactoring