diff --git a/extras/hs-test/actions.go b/extras/hs-test/actions.go
index 1f35ee7..9885f87 100755
--- a/extras/hs-test/actions.go
+++ b/extras/hs-test/actions.go
@@ -19,20 +19,9 @@
 	"github.com/edwarnicke/vpphelper"
 )
 
-func RegisterActions() {
-	cfgTable = make(map[string]func([]string) *ActionResult)
-	reg("echo-srv-internal", Configure2Veths)
-	reg("echo-cln-internal", Configure2Veths)
-	reg("echo-client", RunEchoClient)
-	reg("echo-server", RunEchoServer)
-	reg("vpp-proxy", ConfigureVppProxy)
-	reg("vpp-envoy", ConfigureEnvoyProxy)
-	reg("http-tps", ConfigureHttpTps)
-	reg("2veths", Configure2Veths)
-	reg("vcl-test-server", RunVclEchoServer)
-	reg("vcl-test-client", RunVclEchoClient)
-	reg("http-cli-srv", RunHttpCliSrv)
-	reg("http-cli-cln", RunHttpCliCln)
+type ConfFn func(context.Context, api.Connection) error
+
+type Actions struct {
 }
 
 func configureProxyTcp(ifName0, ipAddr0, ifName1, ipAddr1 string) ConfFn {
@@ -53,18 +42,18 @@
 	}
 }
 
-func RunHttpCliSrv(args []string) *ActionResult {
+func (a *Actions) RunHttpCliSrv(args []string) *ActionResult {
 	cmd := fmt.Sprintf("http cli server")
-	return ApiCliInband("/tmp/2veths", cmd)
+	return ApiCliInband("/tmp/Configure2Veths", cmd)
 }
 
-func RunHttpCliCln(args []string) *ActionResult {
+func (a *Actions) RunHttpCliCln(args []string) *ActionResult {
 	cmd := fmt.Sprintf("http cli client uri http://10.10.10.1/80 query %s", getArgs())
 	fmt.Println(cmd)
-	return ApiCliInband("/tmp/2veths", cmd)
+	return ApiCliInband("/tmp/Configure2Veths", cmd)
 }
 
-func ConfigureVppProxy(args []string) *ActionResult {
+func (a *Actions) ConfigureVppProxy(args []string) *ActionResult {
 	ctx, cancel := newVppContext()
 	defer cancel()
 
@@ -81,7 +70,7 @@
 	return nil
 }
 
-func ConfigureEnvoyProxy(args []string) *ActionResult {
+func (a *Actions) ConfigureEnvoyProxy(args []string) *ActionResult {
 	var startup Stanza
 	startup.
 		NewStanza("session").
@@ -127,7 +116,7 @@
 	return NewActionResult(err, ActionResultWithStdout(cliInbandReply.Reply))
 }
 
-func RunEchoClient(args []string) *ActionResult {
+func (a *Actions) RunEchoClient(args []string) *ActionResult {
 	outBuff := bytes.NewBuffer([]byte{})
 	errBuff := bytes.NewBuffer([]byte{})
 
@@ -140,7 +129,7 @@
 		ActionResultWithStderr(string(errBuff.String())))
 }
 
-func RunEchoServer(args []string) *ActionResult {
+func (a *Actions) RunEchoServer(args []string) *ActionResult {
 	cmd := fmt.Sprintf("vpp_echo server TX=RX socket-name /tmp/echo-srv/var/run/app_ns_sockets/1 use-app-socket-api uri %s://10.10.10.1/12344", args[2])
 	errCh := exechelper.Start(cmd)
 	select {
@@ -152,17 +141,17 @@
 	return nil
 }
 
-func RunEchoSrvInternal() *ActionResult {
+func (a *Actions) RunEchoSrvInternal(args []string) *ActionResult {
 	cmd := fmt.Sprintf("test echo server %s uri tcp://10.10.10.1/1234", getArgs())
-	return ApiCliInband("/tmp/2veths", cmd)
+	return ApiCliInband("/tmp/Configure2Veths", cmd)
 }
 
-func RunEchoClnInternal() *ActionResult {
+func (a *Actions) RunEchoClnInternal(args []string) *ActionResult {
 	cmd := fmt.Sprintf("test echo client %s uri tcp://10.10.10.1/1234", getArgs())
-	return ApiCliInband("/tmp/2veths", cmd)
+	return ApiCliInband("/tmp/Configure2Veths", cmd)
 }
 
-func RunVclEchoServer(args []string) *ActionResult {
+func (a *Actions) RunVclEchoServer(args []string) *ActionResult {
 	f, err := os.Create("vcl_1.conf")
 	if err != nil {
 		return NewActionResult(err, ActionResultWithStderr(("create vcl config: ")))
@@ -182,7 +171,7 @@
 	return nil
 }
 
-func RunVclEchoClient(args []string) *ActionResult {
+func (a *Actions) RunVclEchoClient(args []string) *ActionResult {
 	outBuff := bytes.NewBuffer([]byte{})
 	errBuff := bytes.NewBuffer([]byte{})
 
@@ -238,7 +227,7 @@
 	}
 }
 
-func Configure2Veths(args []string) *ActionResult {
+func (a *Actions) Configure2Veths(args []string) *ActionResult {
 	var startup Stanza
 	startup.
 		NewStanza("session").
@@ -317,7 +306,7 @@
 	return afPacketCreateRsp.SwIfIndex, nil
 }
 
-func ConfigureHttpTps(args []string) *ActionResult {
+func (a *Actions) ConfigureHttpTps(args []string) *ActionResult {
 	ctx, cancel := newVppContext()
 	defer cancel()
 	con, vppErrCh := vpphelper.StartAndDialContext(ctx,
diff --git a/extras/hs-test/echo_test.go b/extras/hs-test/echo_test.go
index 55f7500..74ff4cb 100755
--- a/extras/hs-test/echo_test.go
+++ b/extras/hs-test/echo_test.go
@@ -24,25 +24,25 @@
 	}
 	defer func() { exechelper.Run("docker stop " + clnInstance) }()
 
-	_, err = hstExec("2veths srv", srvInstance)
+	_, err = hstExec("Configure2Veths srv", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("2veths cln", clnInstance)
+	_, err = hstExec("Configure2Veths cln", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("echo-srv-internal private-segment-size 1g fifo-size 4 no-echo", srvInstance)
+	_, err = hstExec("RunEchoSrvInternal private-segment-size 1g fifo-size 4 no-echo", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	o, err := hstExec("echo-cln-internal nclients 10000 bytes 1 syn-timeout 100 test-timeout 100 no-return private-segment-size 1g fifo-size 4", clnInstance)
+	o, err := hstExec("RunEchoClnInternal nclients 10000 bytes 1 syn-timeout 100 test-timeout 100 no-return private-segment-size 1g fifo-size 4", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
diff --git a/extras/hs-test/framework_test.go b/extras/hs-test/framework_test.go
index 78a2892..3800392 100755
--- a/extras/hs-test/framework_test.go
+++ b/extras/hs-test/framework_test.go
@@ -78,5 +78,4 @@
 func TestVeths2(t *testing.T) {
 	var m Veths2Suite
 	suite.Run(t, &m)
-
 }
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index fbbd64a..bd93736 100755
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -23,7 +23,7 @@
 	defer func() { exechelper.Run("docker stop " + dockerInstance) }()
 
 	// start & configure vpp in the container
-	_, err = hstExec(dockerInstance, dockerInstance)
+	_, err = hstExec("ConfigureHttpTps", dockerInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -56,13 +56,13 @@
 	}
 	defer func() { exechelper.Run("docker stop " + clnInstance) }()
 
-	_, err = hstExec("2veths srv", srvInstance)
+	_, err = hstExec("Configure2Veths srv", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("2veths cln", clnInstance)
+	_, err = hstExec("Configure2Veths cln", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -70,7 +70,7 @@
 
 	t.Log("configured IPs...")
 
-	_, err = hstExec("http-cli-srv", srvInstance)
+	_, err = hstExec("RunHttpCliSrv", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -78,7 +78,7 @@
 
 	t.Log("configured http server")
 
-	o, err := hstExec("http-cli-cln /show/version", clnInstance)
+	o, err := hstExec("RunHttpCliCln /show/version", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go
index 0783b18..13c102e 100755
--- a/extras/hs-test/ldp_test.go
+++ b/extras/hs-test/ldp_test.go
@@ -47,13 +47,13 @@
 	}
 	defer func() { exechelper.Run("docker stop " + clnInstance) }()
 
-	_, err = hstExec("2veths srv", srvInstance)
+	_, err = hstExec("Configure2Veths srv", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("2veths cln", clnInstance)
+	_, err = hstExec("Configure2Veths cln", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -66,7 +66,7 @@
 		Append("app-scope-local").
 		Append("app-scope-global").
 		Append("use-mq-eventfd").
-		Append(fmt.Sprintf("app-socket-api /tmp/%s/2veths/var/run/app_ns_sockets/2", clnInstance)).Close().
+		Append(fmt.Sprintf("app-socket-api /tmp/%s/Configure2Veths/var/run/app_ns_sockets/2", clnInstance)).Close().
 		SaveToFile(clnVcl)
 	if err != nil {
 		t.Errorf("%v", err)
@@ -80,7 +80,7 @@
 		Append("app-scope-local").
 		Append("app-scope-global").
 		Append("use-mq-eventfd").
-		Append(fmt.Sprintf("app-socket-api /tmp/%s/2veths/var/run/app_ns_sockets/1", srvInstance)).Close().
+		Append(fmt.Sprintf("app-socket-api /tmp/%s/Configure2Veths/var/run/app_ns_sockets/1", srvInstance)).Close().
 		SaveToFile(srvVcl)
 	if err != nil {
 		t.Errorf("%v", err)
diff --git a/extras/hs-test/main.go b/extras/hs-test/main.go
index f54b6c4..9de0d31 100755
--- a/extras/hs-test/main.go
+++ b/extras/hs-test/main.go
@@ -7,15 +7,10 @@
 	"os"
 	"os/exec"
 	"os/signal"
-
-	"git.fd.io/govpp.git/api"
+	"reflect"
 )
 
-type CfgTable map[string]func([]string) *ActionResult
-
-var cfgTable CfgTable
-
-type ConfFn func(context.Context, api.Connection) error
+var actions Actions
 
 func newVppContext() (context.Context, context.CancelFunc) {
 	ctx, cancel := signal.NotifyContext(
@@ -116,15 +111,18 @@
 	return NewActionResult(nil)
 }
 
-func reg(key string, fn func([]string) *ActionResult) {
-	cfgTable[key] = fn
-}
-
 func processArgs() *ActionResult {
-	fn := cfgTable[os.Args[1]]
-	if fn == nil {
-		return NewActionResult(fmt.Errorf("internal: no config found for %s", os.Args[1]))
+	nArgs := len(os.Args) - 1 // skip program name
+	if nArgs < 1 {
+		return NewActionResult(fmt.Errorf("internal: no action specified!"))
 	}
+	action := os.Args[1]
+	methodValue := reflect.ValueOf(&actions).MethodByName(action)
+	if !methodValue.IsValid() {
+		return NewActionResult(fmt.Errorf("internal unknown action %s!", action))
+	}
+	methodIface := methodValue.Interface()
+	fn := methodIface.(func([]string) *ActionResult)
 	return fn(os.Args)
 }
 
@@ -144,8 +142,6 @@
 		os.Exit(0)
 	}
 
-	RegisterActions()
-
 	var err error
 	res := processArgs()
 	err = writeSyncFile(res)
diff --git a/extras/hs-test/proxy_test.go b/extras/hs-test/proxy_test.go
index 797de52..d426b61 100755
--- a/extras/hs-test/proxy_test.go
+++ b/extras/hs-test/proxy_test.go
@@ -9,7 +9,7 @@
 	"github.com/edwarnicke/exechelper"
 )
 
-func testProxyHttpTcp(t *testing.T, dockerInstance string, proxySetup func() error) error {
+func testProxyHttpTcp(t *testing.T, dockerInstance, action string, proxySetup func() error) error {
 	const outputFile = "test.data"
 	const srcFile = "10M"
 	stopServer := make(chan struct{}, 1)
@@ -23,7 +23,7 @@
 	defer func() { exechelper.Run("docker stop " + dockerInstance) }()
 
 	// start & configure vpp in the container
-	_, err = hstExec(dockerInstance, dockerInstance)
+	_, err = hstExec(action, dockerInstance)
 	if err != nil {
 		return fmt.Errorf("error starting vpp in container: %v", err)
 	}
@@ -72,7 +72,7 @@
 func (s *NsSuite) TestVppProxyHttpTcp() {
 	t := s.T()
 	dockerInstance := "vpp-proxy"
-	err := testProxyHttpTcp(t, dockerInstance, configureVppProxy)
+	err := testProxyHttpTcp(t, dockerInstance, "ConfigureVppProxy", configureVppProxy)
 	if err != nil {
 		t.Errorf("%v", err)
 	}
@@ -88,7 +88,7 @@
 	ctx, cancel := context.WithCancel(context.Background())
 
 	dockerInstance := "vpp-envoy"
-	err := testProxyHttpTcp(t, dockerInstance, func() error {
+	err := testProxyHttpTcp(t, dockerInstance, "ConfigureEnvoyProxy", func() error {
 		return setupEnvoy(t, ctx, dockerInstance)
 	})
 	if err != nil {
diff --git a/extras/hs-test/vcl_test.go b/extras/hs-test/vcl_test.go
index fddd70d..f699a65 100755
--- a/extras/hs-test/vcl_test.go
+++ b/extras/hs-test/vcl_test.go
@@ -32,14 +32,14 @@
 	echoSrv := "echo-srv"
 	echoCln := "echo-cln"
 
-	err := dockerRun(srvInstance, "-v echo-srv-vol:/tmp/2veths")
+	err := dockerRun(srvInstance, "-v echo-srv-vol:/tmp/Configure2Veths")
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 	defer func() { exechelper.Run("docker stop " + srvInstance) }()
 
-	err = dockerRun(clnInstance, "-v echo-cln-vol:/tmp/2veths")
+	err = dockerRun(clnInstance, "-v echo-cln-vol:/tmp/Configure2Veths")
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -60,26 +60,26 @@
 	}
 	defer func() { exechelper.Run("docker stop " + echoCln) }()
 
-	_, err = hstExec("2veths srv", srvInstance)
+	_, err = hstExec("Configure2Veths srv", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("2veths cln", clnInstance)
+	_, err = hstExec("Configure2Veths cln", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
 	// run server app
-	_, err = hstExec("echo-server "+proto, echoSrv)
+	_, err = hstExec("RunEchoServer "+proto, echoSrv)
 	if err != nil {
 		t.Errorf("echo server: %v", err)
 		return
 	}
 
-	o, err := hstExec("echo-client "+proto, echoCln)
+	o, err := hstExec("RunEchoClient "+proto, echoCln)
 	if err != nil {
 		t.Errorf("echo client: %v", err)
 	}
@@ -102,14 +102,14 @@
 	echoSrv := "echo-srv"
 	echoCln := "echo-cln"
 
-	err := dockerRun(srvInstance, "-v echo-srv-vol:/tmp/2veths")
+	err := dockerRun(srvInstance, "-v echo-srv-vol:/tmp/Configure2Veths")
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 	defer func() { exechelper.Run("docker stop " + srvInstance) }()
 
-	err = dockerRun(clnInstance, "-v echo-cln-vol:/tmp/2veths")
+	err = dockerRun(clnInstance, "-v echo-cln-vol:/tmp/Configure2Veths")
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -130,19 +130,19 @@
 	}
 	defer func() { exechelper.Run("docker stop " + echoCln) }()
 
-	_, err = hstExec("2veths srv-with-preset-hw-addr", srvInstance)
+	_, err = hstExec("Configure2Veths srv-with-preset-hw-addr", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("2veths cln", clnInstance)
+	_, err = hstExec("Configure2Veths cln", clnInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
 	}
 
-	_, err = hstExec("vcl-test-server "+proto, echoSrv)
+	_, err = hstExec("RunVclEchoServer "+proto, echoSrv)
 	if err != nil {
 		t.Errorf("vcl test server: %v", err)
 		return
@@ -150,7 +150,7 @@
 
 	fmt.Println("This whole test case can take around 3 minutes to run. Please be patient.")
 	fmt.Println("... Running first echo client test, before disconnect.")
-	_, err = hstExec("vcl-test-client "+proto, echoCln)
+	_, err = hstExec("RunVclEchoClient "+proto, echoCln)
 	if err != nil {
 		t.Errorf("vcl test client: %v", err)
 		return
@@ -171,7 +171,7 @@
 		t.Errorf("error while stopping hs-test: %v", err)
 		return
 	}
-	_, err = hstExec("2veths srv-with-preset-hw-addr", srvInstance)
+	_, err = hstExec("Configure2Veths srv-with-preset-hw-addr", srvInstance)
 	if err != nil {
 		t.Errorf("%v", err)
 		return
@@ -181,7 +181,7 @@
 	time.Sleep(30 * time.Second) // Wait a moment for the re-attachment to happen
 
 	fmt.Println("... Running second echo client test, after disconnect and re-attachment.")
-	_, err = hstExec("vcl-test-client "+proto, echoCln)
+	_, err = hstExec("RunVclEchoClient "+proto, echoCln)
 	if err != nil {
 		t.Errorf("vcl test client: %v", err)
 	}
