Add a transaction system
better logging is better