Changed controller to use main view