Rework code so that the content view is created in the .ui

This makes code cleaner since it removes some of the magic stuff
from the ContentView class and should hopefully fix the regression
with empty pages that the recent refactorings introduced