Wrapped code to show/hide the sidebar into methods