Refactor MainPage.xaml.cs / CameraManager to separate UI and logic.