Update tests; improve error messages