Improved the transaction class to be more implicit