Create rootView and mainView