Various test scaffold and test suite fixes and new features

Please check out the commit log messages for details :)