Refactor to use ViewModel and add settings panel.