diff --git a/src/server/dial_server.c b/src/server/dial_server.c
index 61a0644..b09c3f8 100644
--- a/src/server/dial_server.c
+++ b/src/server/dial_server.c
@@ -88,23 +88,6 @@
     return ret;
 }
 
-// Returns a pointer to the currently running app, or NULL if nothing is
-// running.
-static DIALApp **get_current_app(DIALServer *ds) {
-    DIALApp *app;
-    DIALApp **ret = &ds->apps;
-    int canStop;
-
-    for (app = ds->apps; app != NULL; ret = &app->next, app = app->next) {
-        app->state = app->callbacks.status_cb(ds, app->name, app->run_id,
-                                              &canStop, app->callback_data);
-        if (app->state == kDIALStatusRunning) {
-            break;
-        }
-    }
-    return ret;
-}
-
 static void url_decode_xml_encode(char *dst, char *src, size_t src_size) {
     char *url_decoded_key = (char *) malloc(src_size + 1);
     urldecode(url_decoded_key, src, src_size);
@@ -210,31 +193,6 @@
     DIALServer *ds = request_info->user_data;
 
     ds_lock(ds);
-    if (strlen(app_name) == 0) {
-        app = *get_current_app(ds);
-        if (app == NULL) {
-            mg_printf(
-                conn,
-                "HTTP/1.1 204 No Content\r\n"
-                "Access-Control-Allow-Origin: %s\r\n"
-                "Content-Length: 0"
-                "\r\n",
-                origin_header);
-        } else {
-            mg_printf(
-                conn,
-                "HTTP/1.1 302 Found\r\n"
-                "Access-Control-Allow-Origin: %s\r\n"
-                "Location: %s%s\r\n"
-                "\r\n",
-                origin_header,
-                request_info->uri,
-                app->name);
-        }
-        ds_unlock(ds);
-        return;
-    }
-
     app = *find_app(ds, app_name);
     if (!app) {
         mg_send_http_error(conn, 404, "Not Found", "Not Found");
@@ -594,8 +552,6 @@
             // get app status
             } else if (!strcmp(request_info->request_method, "GET")) {
                 handle_app_status(conn, request_info, app_name, origin_header);
-            } else if (!strcmp(request_info->request_method, "DELETE")) {
-                handle_app_stop(conn, request_info, app_name, origin_header);
             } else {
                 mg_send_http_error(conn, 501, "Not Implemented",
                                    "Not Implemented");
