Add total to gateway crypt
Sequence generated TX ID
Tiny bit of refactoring