A collection of small fixes

Cleaning up some warnings, standards issues and other accumulated small stuff.