Fixing coding violations and getting rid of warnings.