diff --git a/webgui/ajax.php b/webgui/ajax.php
index 6ca51e0c729626d99f561c368ac4cfd3805f80e7..d7b85ea9c7e2a48e1ad556fcf632b7102298dc56 100644
--- a/webgui/ajax.php
+++ b/webgui/ajax.php
@@ -146,6 +146,12 @@
 	}
 
 	switch ($function) {
+		case "removeAdminGroup":
+
+			print_r($soapParams);
+			$res = removeAdminGroup($soapParams);
+			break;
+
 		case "getWiSPResellers":
 
 			$rawData = array (
diff --git a/webgui/include/ajax/functions/AdminGroups.php b/webgui/include/ajax/functions/AdminGroups.php
index b2cd8416e97d629630a9c751839b2876ad9cf05c..2b95bf14facc2d742246074f1203373dcd7e949f 100644
--- a/webgui/include/ajax/functions/AdminGroups.php
+++ b/webgui/include/ajax/functions/AdminGroups.php
@@ -42,4 +42,19 @@ function getAdminGroups($params) {
 	return array($resultArray,$numResults);
 }
 
+# Return list of users
+function removeAdminGroup($params) {
+	global $db;
+
+	$db->errorInfo();
+	$res = DBDo("DELETE FROM groups WHERE ID = ".$params[0]['id']);
+	print_r($params);
+	# If STH is blank, return the error back to whoever requested the data
+	if (!isset($res)) {
+		print_r($res->errorInfo());
+	}
+
+	return $res;
+}
+
 ?>
diff --git a/webgui/js/app/windows/AdminGroups.js b/webgui/js/app/windows/AdminGroups.js
index 13f4decb1fca5ff2c65c9c421318ba8739093108..5321562faabf086c508d28aa8baf0ae28e1f636d 100644
--- a/webgui/js/app/windows/AdminGroups.js
+++ b/webgui/js/app/windows/AdminGroups.js
@@ -35,7 +35,7 @@ function showAdminGroupWindow() {
 						// Check if we have selected item
 						if (selectedItem) {
 							// If so display window
-							showAdminGroupRemoveWindow(WiSPUserWindow,selectedItem.data.ID);
+							showAdminGroupRemoveWindow(AdminGroupWindow,selectedItem.data.ID);
 						} else {
 							AdminGroupWindow.getEl().mask();
 
@@ -207,7 +207,7 @@ function showAdminGroupEditWindow(id) {
 		ID: id,
 		sortInfo: { field: "Name", direction: "ASC" },
 		baseParams: {
-			SOAPGroupname: globalConfig.soap.username,
+			SOAPUsername: globalConfig.soap.username,
 			SOAPPassword: globalConfig.soap.password,
 			SOAPAuthType: globalConfig.soap.authtype,
 			SOAPModule: 'AdminGroups',
@@ -233,7 +233,7 @@ function showAdminGroupEditWindow(id) {
 		{
 			labelWidth: 85,
 			baseParams: {
-				SOAPGroupname: globalConfig.soap.username,
+				SOAPUsername: globalConfig.soap.username,
 				SOAPPassword: globalConfig.soap.password,
 				SOAPAuthType: globalConfig.soap.authtype,
 				SOAPModule: 'AdminGroups'
@@ -264,7 +264,7 @@ function showAdminGroupEditWindow(id) {
 						ID: id,
 						sortInfo: { field: "Name", direction: "ASC" },
 						baseParams: {
-							SOAPGroupname: globalConfig.soap.username,
+							SOAPUsername: globalConfig.soap.username,
 							SOAPPassword: globalConfig.soap.password,
 							SOAPAuthType: globalConfig.soap.authtype,
 							SOAPModule: 'Agents',
@@ -381,7 +381,7 @@ function showAdminGroupEditWindow(id) {
 		wispGroupFormWindow.getComponent('formpanel').load({
 			params: {
 				id: id,
-				SOAPGroupname: globalConfig.soap.username,
+				SOAPUsername: globalConfig.soap.username,
 				SOAPPassword: globalConfig.soap.password,
 				SOAPAuthType: globalConfig.soap.authtype,
 				SOAPModule: 'AdminGroups',
@@ -403,7 +403,7 @@ function showAdminGroupRemoveWindow(parent,id) {
 	// Display remove confirm window
 	Ext.Msg.show({
 		title: "Confirm removal",
-		msg: "Are you very sure you wish to remove this user?",
+		msg: "Are you very sure you wish to remove this group?",
 		icon: Ext.MessageBox.ERROR,
 		buttons: Ext.Msg.YESNO,
 		modal: false,
@@ -415,7 +415,7 @@ function showAdminGroupRemoveWindow(parent,id) {
 				uxAjaxRequest(parent,{
 					params: {
 						id: id,
-						SOAPGroupname: globalConfig.soap.username,
+						SOAPUsername: globalConfig.soap.username,
 						SOAPPassword: globalConfig.soap.password,
 						SOAPAuthType: globalConfig.soap.authtype,
 						SOAPModule: 'AdminGroups',