add view hierarchy for single page app