Refactored code to enable use of transaction scripts.  All tests passing