Fixed all warnings, added iOS 7 compatibility.