   return true;
 }
 #endif
-void neurite_init(void)
-{
-	struct neurite_data_s *nd = &g_nd;
-	log_dbg("in\n\r");
-
-	__bzero(cfg_buf, NEURITE_CFG_SIZE);
-	__bzero(nd, sizeof(struct neurite_data_s));
-	__bzero(&g_cp, sizeof(struct cmd_parser_s));
-	nd->cp = &g_cp;
-	__bzero(cmd_buf, NEURITE_CMD_BUF_SIZE);
-	cmd_parser_init(nd->cp, cmd_buf, NEURITE_CMD_BUF_SIZE);
-
-	fs_init(nd);
-#if 1
-	if (cfg_validate(nd)) {
-		cfg_load_sync(nd);
-		b_cfg_ready = true;
-		log_dbg("cfg ready\n\r");
-	} else {
-		cfg_init(nd);
-		b_cfg_ready = false;
-		log_dbg("cfg not ready\n\r");
-	}
-#else
-	if (!saveConfig()) {
-		Serial.println("Failed to save config");
-	} else {
-		Serial.println("Config saved");
-	}
-
-	if (!loadConfig()) {
-		Serial.println("Failed to load config");
-	} else {
-		Serial.println("Config loaded");
-	}
-#endif
-	log_info("chip id: %08x\n\r", system_get_chip_id());
-	log_info("uid: %s\n\r", nd->cfg.uid);
-	log_info("topic_to: %s\n\r", nd->cfg.topic_to);
-	log_info("topic_from: %s\n\r", nd->cfg.topic_from);
-#if 0
-	log_dbg("device id: %s\n\r", nd->cfg->device_id);
-	log_dbg("ssid: %s\n\r", nd->cfg->ssid);
-	log_dbg("psk : %s\n\r", nd->cfg->sta_pwd);
-	log_dbg("mqtt user: %s\n\r", nd->cfg->mqtt_user);
-	log_dbg("mqtt pass: %s\n\r", nd->cfg->mqtt_pass);
-#endif
-	start_ticker_but(nd);
-	start_ticker_cmd(nd);
-	log_dbg("out\n\r");
-}
-
 /* TODO server test */
 
 ESP8266WebServer *server;
 File fsUploadFile;
 
-void handleNotFound() {
+static void handleNotFound() {
 	if (!handleFileRead(server->uri())) {
 		String message = "File Not Found\n\n";
 		message += "URI: ";

static void button_hold_handler(struct neurite_data_s *nd, int dts)
{
	if (dts > 5000) {
		if (SPIFFS.remove(NEURITE_CFG_PATH))
			log_dbg("%s removed\n\r", NEURITE_CFG_PATH);
		else
			log_err("%s failed to remove\n\r", NEURITE_CFG_PATH);
	}
}


	ticker_but.attach_ms(50, ticker_button_task, nd);
}

static void reboot(struct neurite_data_s *nd)
{
	log_info("rebooting...\n\r");
	stop_ticker_but(nd);
	stop_ticker_mon(nd);
	stop_ticker_worker(nd);
	stop_ticker_led(nd);
	stop_ticker_cmd(nd);
	ESP.restart();
}

static void cmd_completed_cb(struct cmd_parser_s *cp)
{
	struct neurite_data_s *nd = &g_nd;
