   server.send(404, "text/plain", message);
 }
 
-void httpMainWebPage() {
-  String HTMLoutput = readFromFlash("header.html") + readFromFlash("app.html");      
-  HTMLoutput.replace("%%TYPE%%",BRICK_TYPE);    // Replace brick type in template
-  
-#if defined(MODULE_DHT22)       
-  HTMLoutput = dht22MainWebPage(HTMLoutput);        // DHT22 module main app section
-#endif   
-#if defined(MODULE_STRIP)       
-  HTMLoutput = stripMainWebPage(HTMLoutput);        // DHT22 module main app section
-#endif   
-
-  server.send(200, "text/html", HTMLoutput);    
-}
-

}

/***
 * Reads a file directly from Flash memory 
 */
String readFromFlash(String path) {
  if(path.endsWith("/")) path += "index.html";

#include "flashfiles.h"

/***
 * Brick main web page, builds a page with a section for each enabled module
 */
void httpMainWebPage() {
  String HTMLoutput = readFromFlash("header.html") + readFromFlash("app.html");      
  HTMLoutput.replace("%%TYPE%%",BRICK_TYPE);        // Replace brick type in template
  
#if defined(MODULE_DHT22)       
  HTMLoutput = dht22MainWebPage(HTMLoutput);        // DHT22 module main app section
#endif   
#if defined(MODULE_STRIP)       
  HTMLoutput = stripMainWebPage(HTMLoutput);        // Strip module main app section
#endif   

  server.send(200, "text/html", HTMLoutput);    
}

/***
 * Serves a file directly from Flash memory 
 * Files are defined in websites.h, generated using convertWebFiles.sh
 * 
 * CAUTION : Some ressources have to be gziped (*.ico, *.js, *.css, *.png, etc...)
 */
bool serveFromFlash(String path) {
  if(path.endsWith("/")) path += "index.html";
