Fixed broken tests so they will at least compile, though they do not all
pass right now.