Adds some interim working for calculating the root of the merkle tree

This stuff isn't working yet, my guess is some kind of endian issue when
I'm hashing together nodes in the tree. Committing this to back it up, and
I'll move onto the next stage of the training for now.