var writeChar = function(someOutput, characterToWrite) {
    someOutput.append(characterToWrite); 
}

var delayFunction = function(INITIAL_MULTIPLIER) { return Math.round(Math.random() * INITIAL_MULTIPLIER) + 10};
var writePrompt = function(listOfPrompts, listOfAnswers, someOutput, someContent) {
    if(someContent == undefined || someContent == "") {
        var toOutput = null;
        var newPrompts = null;
        var newAnswers = null;
        if(listOfPrompts.length < listOfAnswers.length) {
            toOutput = listOfAnswers[0];
            newAnswers = listOfAnswers.slice(1);
            newPrompts = listOfPrompts;
        } else if(listOfPrompts.length > listOfAnswers.length) {
            toOutput = listOfPrompts[0];
            newAnswers = listOfAnswers;
            newPrompts = listOfPrompts.slice(1);
        } else {
            if(listOfPrompts.length != 0) {
                toOutput = listOfPrompts[0];
                newAnswers = listOfAnswers;
                newPrompts = listOfPrompts.slice(1);
            } else{
                return;
            }
        }
        if(someOutput != undefined) {
            someOutput.removeClass("active");
        }
        var promptDom = $("<p><p>");
        $('body').append(promptDom);
        writePrompt(newPrompts, newAnswers, promptDom, toOutput);
        return;

    }
    var INITIAL_MULTIPLIER = 20;
    setTimeout(function() {
        var currentChar = someContent.charAt(0);
        someOutput.addClass("active");
        writeChar(someOutput, currentChar);
        writePrompt(listOfPrompts, listOfAnswers, someOutput, someContent.substring(1));
    }, delayFunction(INITIAL_MULTIPLIER));
}

var cleanup = function() {
    var prompts = $('.prompts');
    var answers = $('.answers');
    prompts.remove();
    answers.remove();
}

$(document).ready(function() {
    
    var prompts = $('.prompts p');
    var answers = $('.answers p')
    var promptContents = new Array();
    var answerContents = new Array();
    promptContents = prompts.map(function(index) {
        var currentText = $(this).text();
        return currentText;
    });

    answerContents = answers.map(function(index) {
        var currentText = $(this).text();
        return currentText;
    });
    cleanup();

    writePrompt(promptContents, answerContents);
});
@@ -91,24 +91,50 @@
 Write); %0A%7D%0A%0A
+var globalMultiplier = 1;%0A
 var delayFun
@@ -171,16 +171,75 @@
 PLIER) %7B
+%0A    globalMultiplier = 1/Math.pow(2,globalMultiplier);%0A   
  return 
@@ -287,14 +287,30 @@
 LIER
-) + 10
+ * globalMultiplier);%0A
 %7D;%0Av
@@ -388,16 +388,26 @@
 eContent
+, isAnswer
 ) %7B%0A    
@@ -437,12 +437,334 @@
 ined
- %7C%7C 
+) %7B%0A        toOutput = listOfPrompts%5B0%5D;%0A        newAnswers = listOfAnswers;%0A        newPrompts = listOfPrompts.slice(1);%0A        var promptDom = $(%22%3Cspan%3E%3C/span%3E%22);%0A        promptDom.append(%22%3Cbr%3E%22);%0A        $('termcontainer').append(promptDom);%0A        writePrompt(newPrompts, newAnswers, promptDom, toOutput);%0A    %7D else if(
 some
@@ -863,32 +863,41 @@
 Answers = null;%0A
+        %0A
         if(listO
@@ -1278,30 +1278,16 @@
  %7D else 
-%7B%0A            
 if(listO
@@ -1307,23 +1307,18 @@
 th != 0)
- 
 %7B%0A
-    
         
@@ -1354,36 +1354,32 @@
 0%5D;%0A            
- 
-   
 newAnswers = lis
@@ -1382,36 +1382,32 @@
  listOfAnswers;%0A
-    
             newP
@@ -1451,24 +1451,17 @@
     
-   
- 
 %7D else
+ 
 %7B%0A
-    
     
@@ -1488,23 +1488,33 @@
     
+%7D%0A%0A
     
-%7D%0A
     
-    %7D
+if(isAnswer) %7B
 %0A   
@@ -1514,27 +1514,28 @@
 ) %7B%0A        
-if(
+    
 someOutput !
@@ -1536,29 +1536,38 @@
 tput
- != undefined) %7B%0A
+.addClass(%22answer%22)%0A   
     
+ %7D%0A
     
@@ -1604,25 +1604,16 @@
 tive%22);%0A
-        %7D
 %0A       
@@ -1637,12 +1637,53 @@
 $(%22%3C
-p%3E%3Cp
+span%3E%3C/span%3E%22);%0A        promptDom.append(%22%3Cbr
 %3E%22);
@@ -1698,12 +1698,22 @@
  $('
-body
+.termcontainer
 ').a
@@ -1852,10 +1852,9 @@
 R = 
-20
+5
 ;%0A  
@@ -2100,16 +2100,58 @@
 ng(1));%0A
+        someOutput.removeClass(%22active%22);%0A
     %7D, d
@@ -2359,21 +2359,16 @@
 ion() %7B%0A
-    %0A
     var 
@@ -2432,84 +2432,8 @@
 p')%0A
-    var promptContents = new Array();%0A    var answerContents = new Array();%0A
     

Fix js bugs and improve it to use span.