Fixed a lot of warnings after upgrading Xcode.