Removed some warnings due to some type conversions. Added Xcode5 compatibility and some flags for compile warnings.