Refactoring checksum assignment