diff --git a/Makefile b/Makefile
index ba791e9..d73ab70 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@
 	go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
 	go get -v github.com/golang/protobuf/protoc-gen-go
 	go get -v github.com/google/gopacket
+	go get -v github.com/opencord/omci-sim
 
 bbsim: prereq protos/openolt.pb.go dep
 	go build -i -v -o $@
diff --git a/core/core_server.go b/core/core_server.go
index 667a900..2fc494b 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -22,6 +22,10 @@
 	"strconv"
 	"sync"
 
+	omci "github.com/opencord/omci-sim"
+
+	"reflect"
+
 	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"gerrit.opencord.org/voltha-bbsim/common/utils"
 	"gerrit.opencord.org/voltha-bbsim/device"
@@ -30,9 +34,8 @@
 	"github.com/google/gopacket/layers"
 	"github.com/google/gopacket/pcap"
 	log "github.com/sirupsen/logrus"
-	"google.golang.org/grpc"
 	"golang.org/x/sync/errgroup"
-	"reflect"
+	"google.golang.org/grpc"
 )
 
 const (
@@ -68,9 +71,9 @@
 }
 
 type stateReport struct {
-	device device.Device
+	device  device.Device
 	current device.DeviceState
-	next device.DeviceState
+	next    device.DeviceState
 }
 
 func NewCore(opt *option) *Server {
@@ -88,7 +91,7 @@
 		IndInterval:  opt.intvl,
 		Processes:    []string{},
 		EnableServer: nil,
-		stateRepCh  : make(chan stateReport, 8),
+		stateRepCh:   make(chan stateReport, 8),
 		omciIn:       make(chan openolt.OmciIndication, 1024),
 		omciOut:      make(chan openolt.OmciMsg, 1024),
 	}
@@ -115,7 +118,7 @@
 	s.wg = &sync.WaitGroup{}
 	logger.Debug("Start() Start")
 	defer func() {
-		close(s.stateRepCh  )
+		close(s.stateRepCh)
 		logger.Debug("Start() Done")
 	}()
 	addressport := s.gRPCAddress + ":" + strconv.Itoa(int(s.gRPCPort))
@@ -187,10 +190,10 @@
 func (s *Server) updateDevIntState(dev device.Device, state device.DeviceState) {
 	current := dev.GetIntState()
 	dev.UpdateIntState(state)
-	s.stateRepCh <- stateReport{device: dev, current:current, next: state}
-	if reflect.TypeOf(dev) == reflect.TypeOf(&device.Olt{}){
+	s.stateRepCh <- stateReport{device: dev, current: current, next: state}
+	if reflect.TypeOf(dev) == reflect.TypeOf(&device.Olt{}) {
 		logger.Debug("OLT State updated to:%d", state)
-	} else if reflect.TypeOf(dev) == reflect.TypeOf(&device.Onu{}){
+	} else if reflect.TypeOf(dev) == reflect.TypeOf(&device.Onu{}) {
 		logger.Debug("ONU State updated to:%d", state)
 	} else {
 		logger.Error("UpdateDevIntState () doesn't support this device: %s", reflect.TypeOf(dev))
@@ -331,24 +334,24 @@
 	eg, child := errgroup.WithContext(ctx)
 	child, cancel := context.WithCancel(child)
 
-	eg.Go (func() error {
+	eg.Go(func() error {
 		logger.Debug("runOMCIResponder Start")
 		defer logger.Debug("runOMCIResponder Done")
-		select{
-		case v, ok := <- errch:	// Wait for OmciInitialization
-			if ok {	//Error
+		select {
+		case v, ok := <-errch: // Wait for OmciInitialization
+			if ok { //Error
 				logger.Error("Error happend in Omci:%s", v)
 				return v
-			} else {	//Close
+			} else { //Close
 				s.updateDevIntState(s.Olt, device.OLT_ACTIVE)
 			}
-		case <- child.Done():
+		case <-child.Done():
 			return nil
 		}
 		return nil
 	})
 
-	eg.Go (func () error {
+	eg.Go(func() error {
 		err := s.runMainPktLoop(child, stream)
 		return err
 	})
@@ -385,7 +388,7 @@
 	}
 	nhandler, nnichannel := ioinfo.handler, make(chan Packet, 32)
 	go RecvWorker(ioinfo, nhandler, nnichannel)
-	defer func(){
+	defer func() {
 		close(nnichannel)
 	}()
 
@@ -541,15 +544,8 @@
 }
 
 func getGemPortID(intfid uint32, onuid uint32) (uint32, error) {
-	key := OnuKey{intfid, onuid}
-	if onuState, ok := OnuOmciStateMap[key]; !ok {
-		idx := uint32(0)
-		// Backwards compatible with bbsim_olt adapter
-		return 1024 + (((MAX_ONUS_PER_PON*intfid + onuid - 1) * 7) + idx), nil
-	} else {
-		// FIXME - Gem Port ID is 2 bytes - fix openolt.proto
-		return uint32(onuState.gemPortId), nil
-	}
+	// FIXME - check for errors
+	return uint32(omci.GetGemPortId(intfid, onuid)), nil
 }
 
 func getOnuBySN(onumap map[uint32][]*device.Onu, sn *openolt.SerialNumber) (*device.Onu, error) {
diff --git a/core/omci.go b/core/omci.go
index 4698121..e35fd90 100644
--- a/core/omci.go
+++ b/core/omci.go
@@ -24,6 +24,7 @@
 	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"gerrit.opencord.org/voltha-bbsim/device"
 	"gerrit.opencord.org/voltha-bbsim/protos"
+	omci "github.com/opencord/omci-sim"
 )
 
 func RunOmciResponder(ctx context.Context, omciOut chan openolt.OmciMsg, omciIn chan openolt.OmciIndication, onumap map[uint32][]*device.Onu, errch chan error) {
@@ -54,7 +55,7 @@
 		for {
 			select {
 			case m := <-omciOut:
-				resp_pkt, err := OmciSim(m.IntfId, m.OnuId, HexDecode(m.Pkt))
+				resp_pkt, err := omci.OmciSim(m.IntfId, m.OnuId, HexDecode(m.Pkt))
 				switch err := err.(type) {
 				case nil:
 					// Success
@@ -62,7 +63,7 @@
 					resp.OnuId = m.OnuId
 					resp.Pkt = resp_pkt
 					omciIn <- resp
-				case *OmciError:
+				case *omci.OmciError:
 					// Error in processing omci message. Log and carry on.
 					logger.Debug("%s", err.Msg)
 					continue
@@ -95,7 +96,7 @@
 func isAllOmciInitDone(onumap map[uint32][]*device.Onu) bool {
 	for _, onus := range onumap {
 		for _, onu := range onus {
-			if GetOnuOmciState(onu.OnuID, onu.IntfID) == INCOMPLETE {
+			if omci.GetOnuOmciState(onu.OnuID, onu.IntfID) == omci.INCOMPLETE {
 				return false
 			}
 		}
diff --git a/core/omci_common.go b/core/omci_common.go
deleted file mode 100644
index d4d2e35..0000000
--- a/core/omci_common.go
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package core
-
-import "fmt"
-
-type OmciError struct {
-	Msg string
-}
-
-func (e *OmciError) Error() string {
-	return fmt.Sprintf("%s", e.Msg)
-}
-
-type OnuKey struct {
-	IntfId, OnuId uint32
-}
diff --git a/core/omci_defs.go b/core/omci_defs.go
deleted file mode 100644
index 1de2f41..0000000
--- a/core/omci_defs.go
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package core
-
-import (
-	"bytes"
-	"encoding/binary"
-	"errors"
-
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-)
-
-//
-// OMCI definitions
-//
-
-// OmciMsgType represents a OMCI message-type
-type OmciMsgType byte
-
-const (
-	// Message Types
-	_                                 = iota
-	Create                OmciMsgType = 4
-	Delete                OmciMsgType = 6
-	Set                   OmciMsgType = 8
-	Get                   OmciMsgType = 9
-	GetAllAlarms          OmciMsgType = 11
-	GetAllAlarmsNext      OmciMsgType = 12
-	MibUpload             OmciMsgType = 13
-	MibUploadNext         OmciMsgType = 14
-	MibReset              OmciMsgType = 15
-	AlarmNotification     OmciMsgType = 16
-	AttributeValueChange  OmciMsgType = 17
-	Test                  OmciMsgType = 18
-	StartSoftwareDownload OmciMsgType = 19
-	DownloadSection       OmciMsgType = 20
-	EndSoftwareDownload   OmciMsgType = 21
-	ActivateSoftware      OmciMsgType = 22
-	CommitSoftware        OmciMsgType = 23
-	SynchronizeTime       OmciMsgType = 24
-	Reboot                OmciMsgType = 25
-	GetNext               OmciMsgType = 26
-	TestResult            OmciMsgType = 27
-	GetCurrentData        OmciMsgType = 28
-	SetTable              OmciMsgType = 29 // Defined in Extended Message Set Only
-)
-
-const (
-	// Managed Entity Class values
-	GEMPortNetworkCTP OmciClass = 268
-)
-
-// OMCI Managed Entity Class
-type OmciClass uint16
-
-// OMCI Message Identifier
-type OmciMessageIdentifier struct {
-	Class    OmciClass
-	Instance uint16
-}
-
-type OmciContent [32]byte
-
-type OmciMessage struct {
-	TransactionId uint16
-	MessageType   OmciMsgType
-	DeviceId      uint8
-	MessageId     OmciMessageIdentifier
-	Content       OmciContent
-}
-
-func ParsePkt(pkt []byte) (uint16, uint8, OmciMsgType, OmciClass, uint16, OmciContent, error) {
-	var m OmciMessage
-
-	r := bytes.NewReader(pkt)
-
-	if err := binary.Read(r, binary.BigEndian, &m); err != nil {
-		logger.Error("binary.Read failed: %s", err)
-		return 0, 0, 0, 0, 0, OmciContent{}, errors.New("binary.Read failed")
-	}
-	logger.Debug("OmciRun - TransactionId: %d MessageType: %d, ME Class: %d, ME Instance: %d, Content: %x",
-		m.TransactionId, m.MessageType&0x0F, m.MessageId.Class, m.MessageId.Instance, m.Content)
-	return m.TransactionId, m.DeviceId, m.MessageType & 0x0F, m.MessageId.Class, m.MessageId.Instance, m.Content, nil
-}
diff --git a/core/omci_handlers.go b/core/omci_handlers.go
deleted file mode 100644
index 135ef92..0000000
--- a/core/omci_handlers.go
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package core
-
-import (
-	"encoding/binary"
-	"errors"
-
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-)
-
-type OmciMsgHandler func(class OmciClass, content OmciContent, key OnuKey) ([]byte, error)
-
-var Handlers = map[OmciMsgType]OmciMsgHandler{
-	MibReset:      mibReset,
-	MibUpload:     mibUpload,
-	MibUploadNext: mibUploadNext,
-	Set:           set,
-	Create:        create,
-	Get:           get,
-	GetAllAlarms:  getAllAlarms,
-}
-
-func mibReset(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	logger.Debug("Omci MibReset")
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	return pkt, nil
-}
-
-func mibUpload(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	logger.Debug("Omci MibUpload")
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-	pkt[9] = NumMibUploads // Number of subsequent MibUploadNext cmds
-
-	return pkt, nil
-}
-
-func mibUploadNext(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	state := OnuOmciStateMap[key]
-
-	logger.Debug("Omci MibUploadNext %d", state.mibUploadCtr)
-
-	switch state.mibUploadCtr {
-	case 0:
-		// ONT Data (2)
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 1:
-		// Circuit Pack (6) - #1
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x01, 0xf0, 0x00, 0x2f, 0x04,
-			0x49, 0x53, 0x4b, 0x54, 0x71, 0xe8, 0x00, 0x80,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 2:
-		// Circuit Pack (6) - #2
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x01, 0x0f, 0x00, 0x42, 0x52,
-			0x43, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 3:
-		// Circuit Pack (6) - #3
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x01, 0x00, 0xf8, 0x20, 0x20,
-			0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-			0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-			0x20, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 4:
-		// Circuit Pack (6) - #4
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x01, 0x00, 0x04, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 5:
-		// Circuit Pack (6) - #5
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x80, 0xf0, 0x00, 0xee, 0x01,
-			0x49, 0x53, 0x4b, 0x54, 0x71, 0xe8, 0x00, 0x80,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 6:
-		// Circuit Pack (6) - #6
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x80, 0x0f, 0x00, 0x42, 0x52,
-			0x43, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 7:
-		// Circuit Pack (6) - #7
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x80, 0x00, 0xf8, 0x20, 0x20,
-			0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-			0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-			0x20, 0x20, 0x00, 0x08, 0x40, 0x10, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 8:
-		// Circuit Pack (6) - #8
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x06, 0x01, 0x80, 0x00, 0x04, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 9, 10, 11, 12:
-		// PPTP (11)
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x00, 0x0b, 0x01, 0x01, 0xff, 0xfe, 0x00, 0x2f,
-			0x00, 0x00, 0x00, 0x00, 0x03, 0x05, 0xee, 0x00,
-			0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-		pkt[11] = state.pptpInstance // ME Instance
-		state.pptpInstance++
-	case 13, 14, 15, 16, 17, 18, 19, 20:
-		// T-CONT (262)
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x01, 0x06, 0x80, 0x00, 0xe0, 0x00, 0xff, 0xff,
-			0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-		pkt[11] = state.tcontInstance // TCONT ME Instance
-		state.tcontInstance++
-	case 21:
-		// ANI-G (263)
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x01, 0x07, 0x80, 0x01, 0xff, 0xff, 0x01, 0x00,
-			0x08, 0x00, 0x30, 0x00, 0x00, 0x05, 0x09, 0x00,
-			0x00, 0xe0, 0x54, 0xff, 0xff, 0x00, 0x00, 0x0c,
-			0x63, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-	case 22, 23, 24, 25:
-		// UNI-G (264)
-		pkt = []byte{
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-			0x01, 0x08, 0x01, 0x01, 0xf8, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-			0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-		pkt[11] = state.uniGInstance // UNI-G ME Instance
-		state.uniGInstance++
-	default:
-		logger.Error("Invalid MibUpload request %d", state.mibUploadCtr)
-		return nil, errors.New("Invalid MibUpload request")
-	}
-
-	state.mibUploadCtr++
-	return pkt, nil
-}
-
-func set(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-	logger.Debug("Omci Set")
-
-	return pkt, nil
-}
-
-func create(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	if class == GEMPortNetworkCTP {
-		if onuOmciState, ok := OnuOmciStateMap[key]; !ok {
-			logger.Error("ONU Key Error - IntfId: %d, OnuId:", key.IntfId, key.OnuId)
-			return nil, errors.New("ONU Key Error")
-		} else {
-			onuOmciState.gemPortId = binary.BigEndian.Uint16(content[:2])
-			logger.Debug("Gem Port Id %d", onuOmciState.gemPortId)
-			// FIXME
-			OnuOmciStateMap[key].state = DONE
-		}
-	}
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x01,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-	logger.Debug("Omci Create")
-
-	return pkt, nil
-}
-
-func get(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x02, 0x01,
-		0x00, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-	logger.Debug("Omci Get")
-
-	return pkt, nil
-}
-
-func getAllAlarms(class OmciClass, content OmciContent, key OnuKey) ([]byte, error) {
-	var pkt []byte
-
-	pkt = []byte{
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
-		0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-	logger.Debug("Omci GetAllAlarms")
-
-	return pkt, nil
-}
diff --git a/core/omci_mib.go b/core/omci_mib.go
deleted file mode 100644
index 6fba4fd..0000000
--- a/core/omci_mib.go
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package core
-
-const NumMibUploads byte = 26
diff --git a/core/omci_sim.go b/core/omci_sim.go
deleted file mode 100644
index 4335e0a..0000000
--- a/core/omci_sim.go
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package core
-
-import (
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-)
-
-func OmciSim(intfId uint32, onuId uint32, request []byte) ([]byte, error) {
-	var resp []byte
-
-	transactionId, deviceId, msgType, class, instance, content, err := ParsePkt(request)
-	if err != nil {
-		return resp, &OmciError{"Cannot parse omci msg"}
-	}
-
-	logger.Debug("OmciRun - transactionId: %d msgType: %d, ME Class: %d, ME Instance: %d",
-		transactionId, msgType, class, instance)
-
-	key := OnuKey{intfId, onuId}
-	if _, ok := OnuOmciStateMap[key]; !ok {
-		OnuOmciStateMap[key] = NewOnuOmciState()
-	}
-
-	if _, ok := Handlers[msgType]; !ok {
-		logger.Warn("Ignore omci msg (msgType %d not handled)", msgType)
-		return resp, &OmciError{"Unimplemented omci msg"}
-	}
-
-	resp, err = Handlers[msgType](class, content, key)
-	if err != nil {
-		return resp, err
-	}
-	resp[0] = byte(transactionId >> 8)
-	resp[1] = byte(transactionId & 0xFF)
-	resp[2] = 0x2<<4 | byte(msgType)
-	resp[3] = deviceId
-
-	return resp, nil
-}
diff --git a/core/omci_state.go b/core/omci_state.go
deleted file mode 100644
index 2e11d3e..0000000
--- a/core/omci_state.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2018-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package core
-
-type OnuOmciState struct {
-	gemPortId     uint16
-	mibUploadCtr  uint16
-	uniGInstance  uint8
-	tcontInstance uint8
-	pptpInstance  uint8
-	state         istate
-}
-
-type istate int
-
-// TODO - Needs to reflect real ONU/OMCI state
-const (
-	INCOMPLETE istate = iota
-	DONE
-)
-
-var OnuOmciStateMap = map[OnuKey]*OnuOmciState{}
-
-func NewOnuOmciState() *OnuOmciState {
-	return &OnuOmciState{gemPortId: 0, mibUploadCtr: 0, uniGInstance: 1, tcontInstance: 0, pptpInstance: 1}
-}
-
-func GetOnuOmciState(onuId uint32, intfId uint32) istate {
-	key := OnuKey{intfId, onuId}
-	return (OnuOmciStateMap[key].state)
-}
