Some minor warning fixes

A few things that Xcode 5.1.1 complains about - mostly shadowed variables.

Think I've got all the fixes right but probably worth a visual check as there's a slight danger I've left some code referring to the variable that was previously shadowed... if you see what I mean :)