     }
 
     else {
-      return request->send( 400, HEADER_HTML, "Invalid option" );
+      return request->send( 400, HEADER_HTML, INVALID_OPTION );
     }
   });
 
   server.on( "/api/setdevice", HTTP_POST, []( AsyncWebServerRequest * request ) {
     if ( !request->authenticate( WWW_USERNAME, preferences.getString( PASSWD_KEY_NVS, WWW_DEFAULT_PASSWD ).c_str() ) ) {
       return request->requestAuthentication();
-    }
-
-    if ( request->hasArg( "clearnvs" ) ) {
-      preferences.clear();
-      return request->send( 200, HEADER_HTML, "NVS cleared" );
-    }
-
-    if ( request->hasArg( "clearwifi" ) ) {
-      request->send( 200, HEADER_HTML, "WiFi data erased" );
-      WiFi.disconnect(true);
-      return;
     }
 
     else if ( request->hasArg( "hostname" ) ) {

  });

  server.on( "/", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, index_htm, index_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /channels or 'channels.htm'
  server.on( "/channels", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, channels_htm, channels_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /editor or 'editor.htm'
  server.on( "/editor", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, editor_htm, editor_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /logs or 'logs.htm'
  server.on( "/logs", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, logs_htm, logs_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /setup or 'setup.htm'
  server.on( "/setup", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, setup_htm, setup_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });

  //  /filemanager or 'fileman.htm'
  server.on( "/filemanager", HTTP_GET, [] ( AsyncWebServerRequest * request ) {
    if ( htmlUnmodified( request, date ) ) return request->send(304);
    AsyncWebServerResponse *response = request->beginResponse_P( 200, HEADER_HTML, fileman_htm, fileman_htm_len );
    response->addHeader( HEADER_LASTMODIFIED, date );
    request->send( response );
  });


  static const char * PASSWD_KEY_NVS           = "wwwpassword";  //the (changed) admin password is saved in NVS under this key
  static const char * HEADER_LASTMODIFIED      = "Last-Modified";
  static const char * HEADER_HTML              = "text/html";
  static const char * INVALID_OPTION           = "Invalid option";
  static const char * NO_SENSORNUMBER          = "No sensornumber";
  static const char * INVALID_SENSORNUMBER     = "Invalid sensornumber";

  static AsyncWebServer server(80);

  while ( !systemStart.tv_sec )
    delay(100);

  static char modifiedDate[30];

  strftime( modifiedDate, sizeof( modifiedDate ), "%a, %d %b %Y %X GMT", gmtime( &systemStart.tv_sec ) );

  server.on( "/robots.txt", HTTP_GET, []( AsyncWebServerRequest * request ) {
    request->send( 200, HEADER_HTML, "User-agent: *\nDisallow: /\n" );
