Fix some errors
Worked most of the errors out of the tests