 {
   // Read the magnetometer and determine the compass heading:
   lsm.getEvent(&accel, &mag, &gyro, &temp);
-
-  CRGB color = selectColor(fabs(round(mag.magnetic.z * 100)));
-
   // Check for mode change commands
-  CheckForGestures(accel);
-
+  checkForGestures(accel);
+
+  CRGB magHeadingBasedColor = convertHeadingToColor(fabs(round(mag.magnetic.z * 100)));
+
+  if(pendulum == true)
+  {
+    pendulumMode(magHeadingBasedColor);
+  }
+  else 
+  {
+    staticMode(magHeadingBasedColor);
+  }
+
+}
+
+void staticMode(CRGB color)
+{
+  fill_solid(&(rightLense[0]), NUM_LEDS, color);
+  fill_solid(&(leftLense[0]), NUM_LEDS, color);
+  FastLED.show();
+}
+
+void pendulumMode(CRGB color)
+{
   // apply a little frictional damping to keep things in control and prevent perpetual motion
   MomentumH *= friction;
   MomentumV *= friction;

}



  spinUp();
}

void cycleModeForward()
{
  modeNumber++;
  Serial.print("Forward to mode : ");
  Serial.println(modeNumber);
  setDisplayMode();
}

void cycleModeBack()
{
  modeNumber--;
  Serial.print("Back to mode : ");
  Serial.println(modeNumber);
  setDisplayMode();
}

void setDisplayMode()
{
  int numberOfModes = 4;
  if(modeNumber > numberOfModes)
  {
    modeNumber = 1;
  }
  if(modeNumber < 1)
  {
    modeNumber = numberOfModes;
  }

  Serial.print("Actually switching to mode : ");
  Serial.println(modeNumber);

  switch (modeNumber)
  {
    case 1:
      pendulum = true;
      antiGravity = true;
      mirroredEyes = false;
      break;
    case 2:
      pendulum = true;
      antiGravity = false;
      mirroredEyes = true;
      break;
    case 3:
      pendulum = true;
      antiGravity = true;
      mirroredEyes = true;
      break;
    case 4: //Some preset pattern? How do?
      Serial.println("Setting pendulum to false right fucking now!");
      pendulum = false;
      break;
    default:
      Serial.println("Oops, got into the default :()");
      pendulum = true;
      antiGravity = false;
      mirroredEyes = false;
      break;
  }
}

void activateGestureModeSelect()
{
  for(int i = 0; i < NUM_LEDS; i++)
  {
    if(i % 3 == 0)
    {
      rightLense[i] = CRGB(0, 0, 255);
      leftLense[i] = CRGB(0, 0, 255);
    }
    else
    {
      rightLense[i] = CRGB(0, 0, 0);
      leftLense[i] = CRGB(0, 0, 0);
    }
  }
  FastLED.show();
  for(int i = 0; i < 100; i++)
  {
    delay(20);
    lsm.getEvent(&accel, &mag, &gyro, &temp);
    if(accel.acceleration.z > 0.70)
    {
      cycleModeForward();
      break;
    }
    if(accel.acceleration.z < -0.70)
    {
      cycleModeBack();
      break;
    }
  }

}

// gradual spin up
void spinUp()
{
