A lot of work on GUI

I have fixed some stuff and added some more new stuff. All in all the GUI code is quickly closing the feature gap with command line.
These function pointers get overridden by the front-end so we can display messages in a nice popup window.