       </div>
     '
     form = 
-    ' <div id="statement-inputs">
+    '
+    <div id="problem-form" call="edit-xblock-modal" style="background-color:#fff;z-index:1;display:none">
+      <div class="modal-header"> 
+        <h2 class="title modal-window-title">  
+          Coding Problem XML generator 
+        </h2>
+      </div> 
+      <div class="modal-content">  
+        <div id="statement-inputs">
+        </div>
+        <div id="language-options" style="display:none">
+        </div>
+        <div id="initial-text" style="display:none">
+        </div>
       </div>
-      <div id="language-options" style="display:none">
-      </div>
-      <div id="initial-text" style="display:none">
-      </div>
+    </div>
     '
     #popup = $(form).insertAfter($('div > div.modal-window.modal-editor.confirm.modal-lg.modal-type-problem'))
     popup = $(form).appendTo($('div.modal-window.modal-editor.confirm.modal-lg.modal-type-problem'))
 
     languages = [
-            {name:'c++',mode:'text/x-c++src'},
+            {name:'cpp',mode:'text/x-c++src'},
             {name:'java',mode:'text/x-java'},
             {name:'python',mode:'python'}]
     segments = [

          insrtHTML += '<option id="'+language.name+'-option" value="'+language.name+'-txt">'+language.name+'</option>'
      $('#lang-select').html insrtHTML
      hideShow 'language-options','initial-text'
    switchTextBox = ->
      newLang = $('#lang-select',popup).val()
      hideShow curLang,newLang
      curLang = newLang

    $('#goToLangSelect',popup).click langSelect
        
    $('#isCodeSnippet',popup).click ()->
      if($('#isCodeSnippet',popup)[0].checked)
        hideShow 'Submit-button','Next-button'
      else
        hideShow 'Next-button','Submit-button'
    
    $('#backToStatInpt',popup).click hideShow 'language-options','statement-inputs'
    
    $('#Next-button',popup).click initTextSec

    $('#Submit-button,#finalSubmit',popup).click parse

    $('#backToLangSelect',popup).click hideShow 'initial-text','language-options'

    $('#lang-select',popup).change switchTextBox

    parseInput = (s)->
      isMathBlock = false;

          <input type="checkbox" id="isCodeSnippet"/>
          <button id="backToStatInpt">Back</button>
          <button id="Next-button" style="display:none" >Next</button>
          <button id="Submit-button" style="display:inline-block" >Submit</button>
          <button id="closeIt" style:"inline-block">Close</button>'
          
      $('#language-options',popup).html checkboxes
      finHTML = '<select id="lang-select" ></select>'
      for language in languages
