More work on making the tests a little cleaner. Work in progress as a few tests are failing now.