checksum calculation: Add some comments, update debugging code