diff --git a/api/abstract_olt_api.proto b/api/abstract_olt_api.proto
index 12c8941..72dad9b 100644
--- a/api/abstract_olt_api.proto
+++ b/api/abstract_olt_api.proto
@@ -50,13 +50,7 @@
    string DeviceID =1;
    string ChassisDeviceID =2;
 }
-message ActivateSlotMessage{
-   string CLLI =1;
-   int32 SlotNumber = 2;
-}
-message ActivateSlotReturn{
-   bool Success = 1;
-}
+
 message AddOntMessage{
    string CLLI=1;
    int32 SlotNumber=2;
@@ -68,6 +62,16 @@
    bool Success=1;
 }
 
+message DeleteOntMessage{
+   string CLLI=1;
+   int32 SlotNumber=2;
+   int32 PortNumber=3;
+   int32 OntNumber=4;
+   string SerialNumber=5;
+}
+message DeleteOntReturn{
+   bool Success=1;
+}
 service AbstractOLT{
    rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) {
       option(google.api.http) = {
@@ -75,24 +79,23 @@
 	 body:"*"
       };
    }
-
    rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) {
       option(google.api.http) = {
          post: "/v1/CreateOLTChassis"
 	 body:"*"
       };
    }
-   rpc EnableSlot(ActivateSlotMessage) returns (ActivateSlotReturn){
-      option(google.api.http) = {
-         post: "/v1/EnableSlot"
-	 body:"*"
-      };
-   }
    rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) {
       option(google.api.http) = {
          post:"/v1/ProvsionOnt"
 	 body:"*"
       };
    }
+   rpc DeleteOnt(DeleteOntMessage) returns (DeleteOntReturn){
+      option(google.api.http)={
+        post:"/v1/DeleteOnt"
+	body:"*"
+      };
+   }
 }
 
diff --git a/api/handler.go b/api/handler.go
index 4aeae13..6beba76 100644
--- a/api/handler.go
+++ b/api/handler.go
@@ -17,7 +17,6 @@
 package api
 
 import (
-	"errors"
 	"fmt"
 	"log"
 	"net"
@@ -111,23 +110,30 @@
 }
 
 /*
-EnableSlot - activates an OLT Chassis
-*/
-func (s *Server) EnableSlot(ctx context.Context, in *ActivateSlotMessage) (*ActivateSlotReturn, error) {
-	return nil, errors.New("garbage error")
-}
-
-/*
 ProvisionOnt provisions an ONT on a specific Chassis/LineCard/Port
 */
 func (s *Server) ProvisionOnt(ctx context.Context, in *AddOntMessage) (*AddOntReturn, error) {
 	absChassisMap := models.GetAbstractChassisMap()
 	clli := in.GetCLLI()
 	chassis := (*absChassisMap)[clli]
-	err := chassis.ActivateONT(int(in.GetSlotNumber()), int(in.GetPortNumber()), int(in.GetPortNumber()), in.GetSerialNumber())
+	err := chassis.ActivateONT(int(in.GetSlotNumber()), int(in.GetPortNumber()), int(in.GetOntNumber()), in.GetSerialNumber())
 
 	if err != nil {
 		return nil, err
 	}
 	return &AddOntReturn{Success: true}, nil
 }
+
+/*
+DeleteOnt - deletes a previously provision ont
+*/
+func (s *Server) DeleteOnt(ctx context.Context, in *DeleteOntMessage) (*DeleteOntReturn, error) {
+	absChassisMap := models.GetAbstractChassisMap()
+	clli := in.GetCLLI()
+	chassis := (*absChassisMap)[clli]
+	err := chassis.DeleteONT(int(in.GetSlotNumber()), int(in.GetPortNumber()), int(in.GetOntNumber()), in.GetSerialNumber())
+	if err != nil {
+		return nil, err
+	}
+	return &DeleteOntReturn{Success: true}, nil
+}
diff --git a/api/handler_test.go b/api/handler_test.go
index c319e6d..59aad10 100644
--- a/api/handler_test.go
+++ b/api/handler_test.go
@@ -43,7 +43,7 @@
 	clli = ret.DeviceID
 }
 func TestHandler_CreateOLTChassis(t *testing.T) {
-	fmt.Println("in handlerTest_CreateChassis")
+	fmt.Println("in handlerTest_CreateOltChassis")
 	message := &api.AddOLTChassisMessage{CLLI: clli, SlotIP: "12.2.2.0", SlotPort: 9191,
 		Hostname: slotHostname, Type: api.AddOLTChassisMessage_edgecore}
 	ret, err := server.CreateOLTChassis(ctx, message)
@@ -52,43 +52,31 @@
 	}
 	fmt.Printf("CreateOLTChassis success %v\n", ret)
 }
-func TestHandler_EnableSlot(t *testing.T) {
-	ctx = context.Background()
-	server = api.Server{}
-	fmt.Println("in handler_test_EnableSlot")
-	// slot number 1 should be provisioned above
-	message := &api.ActivateSlotMessage{CLLI: clli, SlotNumber: 1}
-	ret, err := server.EnableSlot(ctx, message)
-	if err != nil {
-		t.Fatalf("EnableSlot failed with %v\n", err)
-	}
-	fmt.Printf("EnableSlot succeeded with %v\n", ret)
-	// Slot 2 isn't provisioned and should fail
-	message = &api.ActivateSlotMessage{CLLI: clli, SlotNumber: 2}
-	ret, err = server.EnableSlot(ctx, message)
-	if err != nil {
-		switch err.(type) {
-		case *physical.UnprovisionedSlotError:
-			fmt.Printf("EnableSlot failed as it should with %v\n", err)
-		default:
-			t.Fatalf("EnableSlot failed with %v\n", err)
-		}
-		t.Fatalf("EnableSlot should have failed but didn't")
-	}
-
-}
 func TestHandler_ProvisionOnt(t *testing.T) {
 	ctx = context.Background()
 	server = api.Server{}
-	fmt.Println("in handlerTest_CreateChassis")
+	fmt.Println("in handlerTest_ProvisonOnt")
 	// this one should succeed
 	message := &api.AddOntMessage{CLLI: clli, SlotNumber: 1, PortNumber: 3, OntNumber: 2, SerialNumber: "2033029402"}
 	ret, err := server.ProvisionOnt(ctx, message)
 	if err != nil {
 		t.Fatalf("ProvisionOnt failed %v\n", err)
 	}
+	// do it again on same ont/port should fail with AllReadyActiveError
+	ret, err = server.ProvisionOnt(ctx, message)
+	if err != nil {
+		switch err.(type) {
+		case *physical.AllReadyActiveError:
+			fmt.Printf("ProvisionOnt failed as it should with %v\n", err)
+		default:
+			t.Fatalf("ProvsionOnt test failed with %v\n", err)
+		}
+
+	} else {
+		t.Fatalf("ProvsionOnt should have failed with AllReadyActiveError but didn't")
+	}
+
 	// this one should fail
-	fmt.Println("here")
 	//SlotNumber 1 hasn't been provisioned
 	message = &api.AddOntMessage{CLLI: clli, SlotNumber: 2, PortNumber: 3, OntNumber: 2, SerialNumber: "2033029402"}
 	ret, err = server.ProvisionOnt(ctx, message)
@@ -104,3 +92,43 @@
 	}
 	fmt.Printf("ProvisionOnt success %v\n", ret)
 }
+func TestHandler_DeleteOnt(t *testing.T) {
+	ctx = context.Background()
+	server = api.Server{}
+	fmt.Println("in handlerTest_DeleteOnt")
+	// this one should succeed
+	//De-Activate ONT 3 on PONPort 0 Slot 0 on my cilli but not active
+	message := &api.DeleteOntMessage{CLLI: clli, SlotNumber: 1, PortNumber: 3, OntNumber: 2, SerialNumber: "2033029402"}
+	ret, err := server.DeleteOnt(ctx, message)
+	if err != nil {
+		t.Fatalf("DeleteOnt failed %v\n", err)
+	}
+	// This should fail with AllReadyDeactivatedError
+	ret, err = server.DeleteOnt(ctx, message)
+	if err != nil {
+		switch err.(type) {
+		case *physical.AllReadyDeactivatedError:
+			fmt.Printf("DeleteOnt failed as expected with %v\n", err)
+		default:
+			t.Fatalf("DeleteOnt failed with %v\n", err)
+		}
+	} else {
+		t.Fatal("DeleteOnt should have failed with AllReadyDeactivatedError")
+	}
+
+	// this one should fail
+	//SlotNumber 1 hasn't been provisioned
+	message = &api.DeleteOntMessage{CLLI: clli, SlotNumber: 2, PortNumber: 3, OntNumber: 2, SerialNumber: "2033029402"}
+	ret, err = server.DeleteOnt(ctx, message)
+	if err != nil {
+		switch err.(type) {
+		case *abstract.UnprovisonedPortError:
+			fmt.Printf("DeleteOnt failed as it should with %v\n", err)
+		default:
+			t.Fatalf("DeleteOnt test failed with %v\n", err)
+		}
+	} else {
+		t.Fatalf("DeleteOnt should have failed but didn't")
+	}
+	fmt.Printf("DeletenOnt success %v\n", ret)
+}
