Turn on compiler warnings and address them.

Mostly deprecations.