Made changes to appease strict compiler settings and begin moving to 64bit-compatible primitives (e.g. NSInteger)