Fixing the arrangement.
1 variable name typo defining txn_id and misc PEP 8 fixes