Moved code for transactions and improved table

Needed to push this upstream so others can mess with it. One function
needs to go somewhere else but that's about it.