Transactions nearly complete.

Added lots of logging methods.