fix up a number of deprecated/conversion/shadow warnings
Fixed up bad merge