           clean += ' '
     else # if state is ready
       if escape_stack.length
+        prev = escape_stack.pop()
         switch char
           when '*'
-            escape_stack.pop()
             clean += '  '
             state = commenting
           when '/'
-            escape_stack.pop()
             return clean
           when '\''
-            clean += escape_stack.pop() + char
+            clean += prev + char
             state = quoting
           else
-            clean += escape_stack.pop() + char
+            clean += prev + char
       else
         switch char
           when '/'

  for char in line.split ''
    if state is quoting
      if escape_stack.length
        clean += escape_stack.pop() + char
      else
        switch char
          when '\\'

            clean += char
    else if state is commenting
      if escape_stack.length
        prev = escape_stack.pop()
        if char is '/'
          state = ready
          clean += '  '
        else
