Move checksum calculation to checksum.cpp, guard length, comments.