Refactoring to access MvcApp