Fixed some tests, and eliminated some compiler warnings.