Implement MOD97 checksum, ugly.
Some cleanup on the MOD97 code.
Further cleanup of the MOD97 code.