 void modeSolid();
 void modeTemperature();
 
-// Set the order of modes in the Modeselektor.
-void (*modes[MAX_MODES])() = {
-    &modeOff,
-    &modeTemperature,
-    &modeSolid,
-    &modeGradient,
-    &modeEase,
-    &modeRainbowTrain,
-    &modeRainbow,
-    &modeBreathe,
-    &modeBreatheGradient,
-    &modeJuggle
-};
-
+// Current state
 struct {
     bool on;
     uint8_t brightness;
     uint8_t temperature;
+    void (*effectFunc)();
     char* effect;
     uint8_t r;
     uint8_t g;
     uint8_t b;
 } state;
 
-struct {
-    uint8_t mode;
-    uint8_t var;
-    uint8_t hue;
-    uint8_t sat;
-    uint8_t val;
-} settings;
-
 // MQTT client handles
 WiFiClient wifi_client;
 PubSubClient mqtt_client(wifi_client);
-
-// function called when a MQTT message arrived
-void mqtt_callback(char* p_topic, byte* p_payload, unsigned int p_length) {
-    char msg[512];
-    char payload[256];
-
-    memcpy(payload, p_payload, 256);
-    payload[p_length] = '\0';
-
-    sprintf(msg, "Topic '%s' received payload: '%s'", p_topic, payload);
-    Serial.println(msg);
-
-    if (!strcmp(payload, LIGHT_ON)) {
-        state.on = true;
-    } else {
-        state.on = false;
-    }
-}
-
-
-// Initial setup, called once on boot.
-void setup() {
-    Serial.begin(115200);
-
-    FastLED.addLeds<NEOPIXEL, PIN_LED>(leds, NUM_LEDS).setCorrection(TypicalSMD5050);
-
-    memset(&state, sizeof state, 0);
-
-    fill_solid(&leds[0], NUM_LEDS, HeatColor(170));
-    FastLED.setBrightness(100);
-    FastLED.show();
-
-    settings.mode = 3;
-    settings.var  = 127;
-    settings.hue  = 0;
-    settings.sat  = 255;
-    settings.val  = 127;
-
-    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
-
-    // init the MQTT connection
-    mqtt_client.setServer(MQTT_SERVER_IP, MQTT_SERVER_PORT);
-    mqtt_client.setCallback(mqtt_callback);
-}
 
 // animate returns true if the animation should be stepped.
 uint8_t animate(uint8_t speed) {

    }

    return 0;
}

// animation animates from 0-255.

    uint32_t clock;
    uint32_t expectedDelay;

    clock = millis();
    diff = clock - lastClock;

