Refactor sidebar arrangement