       )))
 
 (defun ems-load-setup ()
-  (process-send-string 
+  (process-send-string
    ems-node-process
-   (concat 
-    "var mjx = require('mathjax-node');" 
+   (concat
+    "var mjx = require('mathjax-node');"
     "var sre = require('speech-rule-engine');"
     "var runWithCounter = function(counter, callback, args) {"
     "  var result = callback.apply(sre, args);"
     "  console.log('BEGINOUTPUT' + counter + ': ' + result + ' :ENDOUTPUT');"
     "};\n"
     )))
-
 
 (defun ems-next-counter ()
   (incf ems-request-counter))

(defun ems-start-walker (expr)
  (process-send-string
   ems-node-process
   ;TODO: Here we can get LaTeX errors.
   (concat 
    (format "mjx.typeset({math: '%s', format: 'TeX', mml:true}, " expr)
    (format "function(data) {sre.walk(data.mml)});\n"))))


;; Input: A key value
(defun ems-move-walker (key)
  (process-send-string
   ems-node-process
   (format "runWithCounter(%d, sre.move, [%d]);\n" (incf ems-request-counter) key)))


;; TODO Error handling after each step.
(defun ems-setup-bridge ()

(defun ems-stop ()
  (ems-teardown-bridge))

(defun ems-test ()
  (ems-start)
  (ems-start-walker "\\\\frac{x}{y}")
