Cleans up warnings

The extended commit message for each explains why the change was made.