Minor sidebar selection improvements and refactoring