Fixed error when no transactions exist that causes calc on nil object
Fixed error where only one transaction was returned
removed some test code