fix up a number of deprecated/conversion/shadow warnings

This should have the merge conflict resolved.