diff --git a/chaincode/controller/stats/stub.go b/chaincode/controller/stats/stub.go
index 35dc18f7bc83c705f60edb91f1a2c03cb7607b07..e20bcb71a95a44aae8d2aa927914629dd91c2214 100644
--- a/chaincode/controller/stats/stub.go
+++ b/chaincode/controller/stats/stub.go
@@ -8,8 +8,10 @@ package stats
 
 import (
 	"encoding/json"
+	"fmt"
 
 	"git.code.tecnalia.com/blockchain/hypercog/model"
+	"git.code.tecnalia.com/ledgerbuilder/sdk/core/util/logging"
 	"git.code.tecnalia.com/ledgerbuilder/sdk/shared"
 )
 
@@ -18,6 +20,7 @@ const ORG_LIST_KEY = "org_list"
 
 type OrgList []string
 
+var log = logging.NewGoLogger("stats")
 
 func getStats(stub shared.LedgerBuildrStubInterface, key string) (st *model.RawStats, err error) {
 	value, err := stub.GetState(key)
@@ -61,6 +64,26 @@ func getOrgList(stub shared.LedgerBuildrStubInterface) (st *OrgList, err error)
 	return st, nil
 }
 
+func resetStats(stub shared.LedgerBuildrStubInterface) (error) {
+	err := stub.DelState(GLOBAL_KEY)
+	if err != nil {
+		return err
+	}
+
+	orgs, err := getOrgList(stub)
+	if len(*orgs) > 0 {
+		for _, org := range *orgs {
+			err = stub.DelState(org)
+			if err != nil {
+				return err
+			}
+		}
+	}
+
+	err = stub.DelState(ORG_LIST_KEY)
+	return err
+}
+
 func (orgs OrgList) contains(org string) (bool) {
 	for _, o := range orgs {
         if o == org {
@@ -70,7 +93,7 @@ func (orgs OrgList) contains(org string) (bool) {
 	return false
 }
 
-func AddOrgIfNotExist(stub shared.LedgerBuildrStubInterface, org string) (err error) {
+func addOrgIfNotExist(stub shared.LedgerBuildrStubInterface, org string) (err error) {
 	orgs, err := getOrgList(stub)
 	if err != nil {
 		return err
@@ -88,6 +111,8 @@ func AddOrgIfNotExist(stub shared.LedgerBuildrStubInterface, org string) (err er
 		if err != nil {
 			return err
 		}
+
+		log.Debug("Added stat for new org")
 	}
 
 	return nil
@@ -129,11 +154,12 @@ func upgradeStats(stub shared.LedgerBuildrStubInterface, globalStats *model.RawS
 		return err
 	}
 
-	err = AddOrgIfNotExist(stub, org)
+	err = addOrgIfNotExist(stub, org)
 	if err != nil {
 		return err
 	}
 
+	log.Debug("Upgrading stats")
 	return nil
 }
 
@@ -164,6 +190,8 @@ func RegisterSale(stub shared.LedgerBuildrStubInterface, quantity uint32, price
 	orgStats.UpgradeSell(quantity, price, units)
 	orgStats.UpgradeSell(quantity, price, units)
 
+	log.Debug(fmt.Sprintf("Sale registered in stats (quantity: %s, price: %s, units: %s)", quantity, price, units))
+
 	err = upgradeStats(stub, globalStats, orgStats)
 	if err != nil {
 		return err