Hacking about to get the GUI working.