I separated out the database models into modules, and created a superclass for the scripts to activate the run, success and failure methods
Changed some of the tests to dry it up and the transaction scripts to use inheritance