Issue181

This should fix issue #181.
I had to make a lot of changes to the GUI compile logic, so this really needs some testing.

If someone could do some quick usage tests, I can merge this into master and we can get on with the release.