Switch from md5 to sha256, fix bugs with hashing, log cas transactions