Refactored some code

Now, only Presenter and MainWindow are allocated in the heap.
Also, the #ifdef's are less ugly. We should still replace
the raw code implementation of the GUI with something else.