Fixed a number of problems all-around with the tests