Merge GUI into master

The big one, ready for submission.