+#include <Adafruit_PWMServoDriver.h>
 #include <Wire.h>
+
 #include "pitches.h"
-#include <Adafruit_PWMServoDriver.h>
 
 // Uses the default address 0x40.
 Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
 
-#define BIG_SERVO_MIN 160 // this is the 'minimum' pulse length count (out of 4096)
-#define BIG_SERVO_MAX 584 // this is the 'maximum' pulse length count (out of 4096)
+// These are the minimum and maximum pulse length counts (out of 4096) for our servos.
+#define BIG_SERVO_MIN 160
+#define BIG_SERVO_MAX 584
 #define MICRO_SERVO_MIN 160
 #define MICRO_SERVO_MAX 584
 

int kissed_flag = 0;
int normal_light_flag = 0;

int photocellPin = A5;     // the cell and 10K pulldown are connected to a0
int photocellReading;     // the analog reading from the sensor divider
int LEDpin = 11;          // connect Red LED to pin 11 (PWM pin)
int LEDbrightness;

int speakerPin = 12;
int numTones = 10;
int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440};
//            mid C  C#   D    D#   E    F    F#   G    G#   A

int mary_had_a_little_lamb_notes[] = {
  NOTE_E4, NOTE_D4, NOTE_C4, NOTE_D4, NOTE_E4, NOTE_E4, NOTE_E4, NOTE_D4, NOTE_D4, NOTE_D4, NOTE_E4, NOTE_E4, NOTE_E4, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_D4, NOTE_E4, NOTE_E4, NOTE_E4, NOTE_E4, NOTE_D4, NOTE_D4, NOTE_E4, NOTE_D4, NOTE_C4
};


void reset_arms()
{
  // Sets left_arm and right_arm to their min and max values.
  pwm.setPWM(left_arm, 0, LEFT_ARM_OPEN);
  pwm.setPWM(right_arm, 0, RIGHT_ARM_OPEN);
}

void reset_ears()
{
  // Sets left_ear and right_ear to the middle.
  pwm.setPWM(left_ear, 0, MIDDLE_EAR);
  pwm.setPWM(right_ear, 0, MIDDLE_EAR);
}

void play_song(int song_number)
{
  // 26 notes long
  for ( int i = 0; i < 26; i++ )
  {
    if ( song_number == 0 )
    {
      int note_length = 1000 / mary_had_a_little_lamb_lengths[i];
      tone(speakerPin, mary_had_a_little_lamb_notes[i], note_length);
    }
    
    int pause_between_notes = note_length * 1.30;
    delay(pause_between_notes);
