Various cleanups

Playing with a static analyzer and randomly picked your Github repo as a victim. It picked up a few things.