OSX compatibility and updated for ARC

I updated the code to be compatible with ARC and also added the ability to use the same class categories on OSX. Sample OSX code also provided.