General refactoring of transaction processing code.
Minor enhancement to tests script to start handling standalone scripts.
Minor view bug fixes.