Fixed broken tests and added some more.