Added the possibility to do not have a toolbar via hasToolbar flag