Reducing the number of compiler warnings.

Reduced warnings in code and tests. Did not touch the generator.