Miscellaneous fixes, working on GUI