clean up transaction parsing code