var timerCount = 15;

window.onload = function() {
  var timerID = document.getElementById('timer');
  timerID.innerHTML += timerCount;
};

var TimerFunc = function() {
  window.onload = function() {
    this.timerID = document.getElementById('timer');
  };
};

TimerFunc.prototype.startTimer = function() {
  this.countdown = window.setInterval(function() {
    timerCount--;
    this.timerID.innerHTML = timerCount;
  }, 1000);
};

TimerFunc.prototype.endTimer = function() {
  clearInterval(this.countdown);
};

var timer = new TimerFunc();

function startTimer() {
  var timerID = document.getElementById('timer');
  window.setInterval(function() {
    timerCount--;
    timerID.innerHTML = timerCount;
  }, 1000);
};

function endTimer() {

};

@@ -1,26 +1,113 @@
-var timerCount = 15;%0A%0A
+// Initial timer length in seconds%0Avar timerCount = 15;%0A%0A// Timer constructor%0Avar TimerFunc = function() %7B%0A  
 wind
@@ -129,28 +129,31 @@
 ction() %7B%0A  
-var 
+  this.
 timerID = do
@@ -186,16 +186,80 @@
 er');%0A  
+  // Disply initial timer length, currently in seconds%0A    this.
 timerID.
@@ -272,9 +272,8 @@
 TML 
-+
 = ti
@@ -286,133 +286,81 @@
 nt;%0A
+  
 %7D;%0A
-%0Avar TimerFunc = function() %7B%0A  window.onload = function() %7B%0A    this.timerID = document.getElementById('timer');%0A  %7D;%0A%7D;%0A
+%7D;%0A%0A// Function to start countdown, decrements timerCount in seconds
 %0ATim
@@ -528,16 +528,65 @@
 0);%0A%7D;%0A%0A
+// Function to manually stop timer from counting%0A
 TimerFun
@@ -691,209 +691,4 @@
 ();%0A
-%0Afunction startTimer() %7B%0A  var timerID = document.getElementById('timer');%0A  window.setInterval(function() %7B%0A    timerCount--;%0A    timerID.innerHTML = timerCount;%0A  %7D, 1000);%0A%7D;%0A%0Afunction endTimer() %7B%0A%0A%7D;%0A

Add comments