Added code to count the total measurable value for each transactions.  Also made minor changes.