define checksum functions as constants at the top, use constant for default md5 checksum

@JensTimmerman: This fixes the remarks you had in #774