Fixing various static analyzer warnings in Xcode 6.0.1.
Merge pull request #133 from wooster/Next

Fixing various static analyzer warnings in Xcode 6.0.1.