Make transaction a hashtable. Update tests