Refactoring head and topbar, automatic imports