diff --git a/internal/pkg/afrouter/affinity-router.go b/internal/pkg/afrouter/affinity-router.go
index 7a94f7b..90c0e7f 100644
--- a/internal/pkg/afrouter/affinity-router.go
+++ b/internal/pkg/afrouter/affinity-router.go
@@ -17,7 +17,6 @@
 package afrouter
 
 import (
-	"errors"
 	"fmt"
 	"github.com/golang/protobuf/proto"
 	"github.com/opencord/voltha-go/common/log"
@@ -35,7 +34,6 @@
 type AffinityRouter struct {
 	name               string
 	association        associationType
-	routingField       string
 	grpcService        string
 	methodMap          map[string]byte
 	nbBindingMethodMap map[string]byte
@@ -45,7 +43,7 @@
 }
 
 func newAffinityRouter(rconf *RouterConfig, config *RouteConfig) (Router, error) {
-	var err error = nil
+	var err error
 	var rtrn_err = false
 	var pkg_re = regexp.MustCompile(`^(\.[^.]+\.)(.+)$`)
 	// Validate the configuration
@@ -76,7 +74,6 @@
 	// routing_field. This needs to be added so that methods
 	// can have different routing fields.
 	var bptr *backend
-	bptr = nil
 	dr := AffinityRouter{
 		name:               config.Name,
 		grpcService:        rconf.ProtoService,
@@ -157,7 +154,7 @@
 	}
 
 	// Create the backend cluster or link to an existing one
-	ok := true
+	var ok bool
 	if dr.cluster, ok = clusters[config.backendCluster.Name]; !ok {
 		if dr.cluster, err = newBackendCluster(config.backendCluster); err != nil {
 			log.Errorf("Could not create a backend for router %s", config.Name)
@@ -166,7 +163,7 @@
 	}
 
 	if rtrn_err {
-		return dr, errors.New(fmt.Sprintf("Failed to create a new router '%s'", dr.name))
+		return dr, fmt.Errorf("Failed to create a new router '%s'", dr.name)
 	}
 
 	return dr, nil
@@ -259,7 +256,7 @@
 					return "", e
 				}
 			default:
-				err := errors.New(fmt.Sprintf("Only integer and string route selectors are permitted"))
+				err := fmt.Errorf("Only integer and string route selectors are permitted")
 				log.Error(err)
 				return "", err
 			}
@@ -298,9 +295,12 @@
 				log.Debugf("MUST CREATE A NEW AFFINITY MAP ENTRY!!")
 				var err error
 				if *ar.currentBackend, err = ar.cluster.nextBackend(*ar.currentBackend, BackendSequenceRoundRobin); err == nil {
-					ar.setAffinity(selector, *ar.currentBackend)
-					//ar.affinity[selector] = *ar.currentBackend
-					//log.Debugf("New affinity set to backend %s",(*ar.currentBackend).name)
+					err := ar.setAffinity(selector, *ar.currentBackend)
+					if err != nil {
+						log.Errorf("Failed to set affinity during Route: %v", err)
+						// TODO: Should we return nil here? We do have a backend, so we can return it, but we did fail
+						// to set affinity...
+					}
 					return *ar.currentBackend, nil
 				} else {
 					sl.err = err
@@ -350,14 +350,14 @@
 				}
 				return nil
 			} else {
-				err := errors.New(fmt.Sprintf("Failed to decode reply field %d for method %s", fld, sl.method))
+				err := fmt.Errorf("Failed to decode reply field %d for method %s", fld, sl.method)
 				log.Error(err)
 				return err
 			}
 		}
 		return nil
 	default:
-		err := errors.New(fmt.Sprintf("Internal: invalid data type in ReplyHander call %v", sl))
+		err := fmt.Errorf("Internal: invalid data type in ReplyHander call %v", sl)
 		log.Error(err)
 		return err
 	}
@@ -368,8 +368,8 @@
 		ar.affinity[key] = be
 		log.Debugf("New affinity set to backend %s for key %s", be.name, key)
 	} else if be2 != be {
-		err := errors.New(fmt.Sprintf("Attempting multiple sets of affinity for key %s to backend %s from %s on router %s",
-			key, be.name, ar.affinity[key].name, ar.name))
+		err := fmt.Errorf("Attempting multiple sets of affinity for key %s to backend %s from %s on router %s",
+			key, be.name, ar.affinity[key].name, ar.name)
 		log.Error(err)
 		return err
 	}
