Removed all callocs from dispatch_apply including function calls within dispatch_apply