Viewdata refactoring