Added checksum functionality and tests