refactor topbar/sidebar