 // Used for light sensor
 int LightCurrent          = 0;             // Current reading
 int LightLast             = LightCurrent;  // Last reading
-int LightThreshUp         = 400;
-int LightThreshDown       = 100;
+int LightThreshUp         = 400;           // Light threshold above which we open door
+int LightThreshDown       = 100;           // Light threshold below which we close door
 int LightThreshTicks      = 0;             // Ticks needed to start door position change
 // Used for clock
 DateTime Now;
-TimeSpan ClockThreshUp;
-TimeSpan ClockThreshDown;
-// Is motor enabled or not
-bool MotorEnabled;
+TimeSpan ClockThreshUp;                    // Time above which we open door
+TimeSpan ClockThreshDown;                  // Time below which we close door
+// Used for motor 
+bool MotorEnabled;                         // Is motor enabled or not?
 
 // Initialize the LCD
 LiquidCrystal Lcd(PIN_LCD_RS, PIN_LCD_ENABLE, PIN_LCD_D4, PIN_LCD_D5, PIN_LCD_D6, PIN_LCD_D7);

  moveDoorDown(REVOLUTIONS_TO_CHANGE);
}

void moveDoorUp(int revolutions) {
  updateDoorStatus(DOOR_MOVING_UP, DOOR_POSITION_UNKNOWN);
  moveDoor(revolutions);
  updateDoorStatus(DOOR_STATIONARY, DOOR_POSITION_UP);
}

// Start moving door down
void moveDoorDown(int revolutions) {
  updateDoorStatus(DOOR_MOVING_DOWN, DOOR_POSITION_UNKNOWN);
  moveDoor(-revolutions);
  updateDoorStatus(DOOR_STATIONARY, DOOR_POSITION_DOWN);

  LightCurrent = analogRead(PIN_PHOTOCELL);
}

// Read clock time and set global var
void updateTime() {
  Now = RTC.now();
}

//
// Door moving functions
//

// Ensures door is open
void openDoor() {
  // If door is already up, just return
  if ( DoorPosition == DOOR_POSITION_UP ) {
