Fix the calculateChecksum function. It works way faster now.