diff --git a/common.c b/common.c
index bcba1341ec00e8dc995cdb452826e2fd8b538b1a..2a0ede4d1b0f55da98d9b44d76b4a2e25a087197 100644
--- a/common.c
+++ b/common.c
@@ -48,8 +48,3 @@ struct blob_buf json_to_blob(struct json_object *response, struct blob_buf bb)
 
 	return bb;
 }
-
-void check_debug(void)
-{
-	printf("debug: %d\n", debug);
-}
\ No newline at end of file
diff --git a/dongle.c b/dongle.c
index 771468db2d98c5ccd07b39ed488ee3a09cb170a0..58c490274ecfc4ab836c804d7996dac4d03a0818 100644
--- a/dongle.c
+++ b/dongle.c
@@ -9,8 +9,8 @@ struct ubus_context *ctx;
 int debug;
 
 static struct option long_options[] = {
-    {"debug", required_argument, NULL, 'd'},
-	{0,		0,					0,		0}
+	{"debug", required_argument, NULL, 'd'},
+	{0,	0,	0,	0}
 };
 
 int parse_args(int argc, char **argv)
@@ -19,22 +19,19 @@ int parse_args(int argc, char **argv)
 
 	while ((ch = getopt_long(argc, argv, "d:", long_options, NULL)) != -1) {
 		switch (ch) {
-			case 'd':
-				debug = atoi(optarg);
-				if (debug > 1 || debug < 0) {
-					printf("%s: option '-%c' is invalid.\n", argv[0], optopt); //cant exactly do debug print in here...
-					goto fail;
-				}
-				goto done;
-				break;
-			case ':':
-				printf(stderr, "%s: option '-%c' requires an argument\n", argv[0], optopt);
+		case 'd':
+			debug = atoi(optarg);
+			if (debug > 1 || debug < 0) {
+				printf("%s: option '-%c' is invalid.\n", argv[0], optopt); //cant exactly do debug print in here...
 				goto fail;
-				break;
-			case '?':
-				printf(stderr, "%s: option '-%c' is invalid: ignored\n", argv[0], optopt);
-				goto fail;
-				break;
+			}
+			goto done;
+		case ':':
+			printf(stderr, "%s: option '-%c' requires an argument\n", argv[0], optopt);
+			goto fail;
+		case '?':
+			printf(stderr, "%s: option '-%c' is invalid: ignored\n", argv[0], optopt);
+			goto fail;
 		}
 	}
 
diff --git a/libmobile.c b/libmobile.c
index 7be223066cb2a9ce6db73ae37cabdbacef6b3d3c..017c143f3e282bfdd80df2cb2755f8058558ff18 100644
--- a/libmobile.c
+++ b/libmobile.c
@@ -157,7 +157,7 @@ fail:
  *
  * IMPORTANT NOTE
  *		Will alter the input string and allocate memory for the return value!
- * 		The caller is responsible for freeing the return value.
+ *		The caller is responsible for freeing the return value.
  */
 static char *lexer(char **input, char *delimiter)
 {
@@ -186,7 +186,7 @@ static char *lexer(char **input, char *delimiter)
 
 /**
  * Function: get_query_wrapper
- * 		Wraps the input comma-separated values to the appropriate address format for a GET request.
+ *		Wraps the input comma-separated values to the appropriate address format for a GET request.
  *
  * Parameters:
  *		vars - Char pointer pointing to comma-separated values to retreive.
@@ -463,11 +463,6 @@ fail:
 	return NULL;
 }
 
-struct json_object *mobile_get_wan_apn(char *ip_addr)
-{
-	return prepare_request(ip_addr, "wan_apn", GET);
-}
-
 struct json_object *mobile_get_remaining_tries(char *ip_addr)
 {
 	return prepare_request(ip_addr, "pinnumber", GET);
diff --git a/libmobile.h b/libmobile.h
index 8a555cccf9ba3eff57bbd49b39feb80c4dcf4570..f699f7977826e3b899db4dfc2733dd3741b14d73 100644
--- a/libmobile.h
+++ b/libmobile.h
@@ -121,17 +121,6 @@ struct json_object *mobile_get_roam_status(char *ip_addr);
  */
 struct json_object *mobile_get_current_apn(char *ip_addr);
 
-/**
- * Function: mobile_get_wan_apn
- *
- * Gets the currently active APN profile's WAN name.
- *
- * Returns:
- *		A pointer to a json_object containing the JSON response from the server. {"wan_apn": "<name>" } on success.
- *		NULL on failure.
- */
-struct json_object *mobile_get_wan_apn(char *ip_addr);
-
 /**
  * Function: mobile_get_remaining_tries
  *