Fix some warnings, minor formatting tweaks