Feature/refactor mvp

Refactor the main window according to the model-view-presenter pattern.