A bunch of small changes to address Dave's review and fix some issues pointed out by lint/vet