Test suite fixes

Merging updated tests by Butler and Aki, and fixes to test suite