 
 void reset_arms()
 {
-  // Sets left_arm and right_arm at their min and max values.
+  // 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 at the middle.
+  // 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()
+void play_song(int song_number)
 {
   // 26 notes long
   for ( int i = 0; i < 26; i++ )
   {
-    int note_length = 1000 / mary_had_a_little_lamb_lengths[i];
-    tone(speakerPin, mary_had_a_little_lamb_notes[i], note_length);
+    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);

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
};

  4, 4, 4, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2
};

void setup()
{
  // Initialize serial port at 9600 baud.
  Serial.begin(9600);

  pwm.begin();
  pwm.setPWMFreq(60);  // Analog servos run at ~60 Hz.
  
  // Initialize the pushbutton pin as an input.
  pinMode(button_pin, INPUT);
  
  // Put arms and ears at normal position and wait for that to happen.
  reset_arms();
  reset_ears();
  delay(1000);
}

void loop()
{
  photocell_reading = analogRead(photocell_pin);
  Serial.print("Analog reading = ");
  Serial.print(photocell_reading);
  // Commented out because it's unneeded debugging information.
  // Serial.print(", ");
  // Serial.println(normal_light_flag);

  // When it gets bright or dark, make a sound.
  // Stop playing the sound until it's normal lighting out again.
  if ( photocell_reading >= 700 && photocell_reading <= 710 )
  {
    normal_light_flag = 1;
  }

  if ( photocell_reading < 700 && normal_light_flag )
  {
    play_song(0);
    normal_light_flag = 0;
  }
  else if ( photocell_reading > 710 && normal_light_flag )
  {
    for ( int i = 0; i < 4; i++ )
    {
      wiggle_ears();
    }
    
    reset_ears();
    normal_light_flag = 0;
  }
  
  button_state = digitalRead(button_pin);
  
  if ( button_state == HIGH )
  {
    hug();
    reset_arms();
  }
  
  // TODO: check if manually moved
}

void wiggle_ears()
