Refactoring sidebar