Removed code deprecated in iOS7.
Fixed a warning that an unused variable existed.