Improved the 'testing' framework
Improving the testing, fixing up other code as I go