Feature/refactor mainwindow

This is the first pass of the planned refactor.
Right now I have not touched the main initialization, and I left some methods there because I didn't see very clearly which was the best place. But I believe it's better to cut it here so the rebases are not too bad in the next coming days. Tests are passing and **I think** all functionality is unaffected.