-
+// Arduino Libraries
 #include <Arduino.h>
 #include <IRLib.h>
 #include <Wire.h>
 #include <Adafruit_MMA8451.h>
 #include <Adafruit_Sensor.h>
 
+// MAD Libraries
 #include "Accelerometer.h"
 #include "Relay.h"
 #include "Lights.h"
 #include "RemoteControl.h"
 
+// Static Members
 static Relay * r0 = 0;
 static Relay * r1 = 0;
 static Lights * lights = 0;
 static RemoteControl * remote = 0;
 static Accelerometer * accelerometer = 0;
+static boolean stopped = 0;
 
+// Function Declerations
 void relay_setup();
 
-boolean stopped = 0;
-
+// Defines
 #define LED 13
 #define RELAY_0_PIN 10
 #define RELAY_1_PIN 9

  r1->loop();
  lights->loop();
  
  if ( c ) {
   // clear last command 
   remote->clearCommand();
  }

  // blink every second
  // unsigned long second = (unsigned long)((float)millis() / 1000);

}

void loop() {
  
  accelerometer->loop();
  // accelerometer->log();

  remote->loop();

  // indicates whether we should clear last command
  // boolean clearLastCommand = true;

  // Process remote command:

  if ( remote->last_command == RemoteCommandStop ) {
    
    stopped = 1;
