Remove some compiler warnings

These commits reduce the number of unnecessary compiler warnings.