Code cleaned. Functions to do checksum implemented but not applied to main().