Update test suite

Also fix some Clang warnings, although there are still some Clang errors left.