Moving checksum into its own method.