Refactor transaction types