Remove global variabes for checksumm check
Add documentation