Updated to compile with OSX 10.9 (ARC) and updated to Xcode format 3.2
Fixed all warnings