Removed all but the .h and .m files for portability and fixed some syntax