fix up a number of deprecated/conversion/shadow warnings

This fixes up a number of deprecated on iOS 6 warnings, a shadowed var warning, some analyzer issues etc.