Warnings and static analyzer fixes

The warnings and static analyzer started getting annoying.

Even though this shouldn't affect functionality, feel free to decline it. Compiling with Xcode 6 just gets grumpy and constantly warns on these items.