Major changes to checksum. Untested