Refactored changes to more closely follow Model-View-Presenter architecture.