Updated for ARC, Xcode 5, 64-bit. Other small fixes.