Further changes to the script tuner, can now in theory save scripts
(Note that this code is being hacked together and needs redoing someday)