Adding hash function to Transaction.pm and fixing serialization bugs