Refactoring App.hs and fixing an endianness issue with the genesis block hashes