   pinMode(buttonBpin, INPUT_PULLUP);
   
   AFMS.begin();  // create with the default frequency 1.6KHz
-  myMotor->setSpeed(250);  // 10 rpm  
-  initialLightReading = analogRead(lightSensorPin);
-  brokenBeamReading = initialLightReading / 2;
-
+  myMotor->setSpeed(250);  
+
+  //Get some initial values for each light string
   for (int i = 0; i < numberNotes; i++) { 
     reflectedLightValues[i] = analogRead(lightSensorPin);
   }
 
   setupGinSing();
-  
-}
-
-
+}
+
+//This is the code required to get GinSing ready to go.
 void setupGinSing() {
   GS.begin ( rcvPin , sndPin , ovfPin );               // start the device (required) and enter preset mode
   //For preset mode - change this when going to poly mode

  return currentLightReading;
}

float rawRange = 1024; // 3.3v
float logRange = 5.0; // 3.3v = 10^5 lux

float RawToLux(int raw)
{
float logLux = raw * logRange / rawRange;
return pow(10, logLux);
}


void detectANote() {
  checkSonar();
  if (debug) {
    for (int i = 0; i < numberNotes; i++) {
      Serial.print(i);

 #include <GinSing.h>
#include <GinSingDefs.h>
#include <GinSingMaster.h>
#include <GinSingPoly.h>
