Tidied up test sketches.  Not tested.