Various cleanups to fix compiler warnings.