Some GUI work and a bit of script stuff