Tidy up tests and schemes

Add a new qstest script from running tests from the command line