Refactor and clean up TxLog

There is still more that can be done, but hopefully it is now a little more readable and
in line with our house style. The parsing could for instance be split out into its own
class.