Refactored to support using _AppStart.cshtml