Refactored MainView