refactor app view context creation