   (setq merlin-overlay (make-overlay (point-min) merlin-lock-point))
   (overlay-put merlin-overlay 'face 'merlin-locked-face))
 
-(defun merlin-update-point (point view-errors-p)
-  "Moves the merlin point to around the given the given point. It proceeds as follows:
-- It retracts merlin from the point given in argument to get it to the last phrase ending.
-- It tells merlin the contents between the last phrase known to merlin and the argument
+(defun merlin-update-point (view-errors-p)
+  "Moves the merlin point to around the given the current
+point. It proceeds as follows: 
+
+- It retracts merlin from the point given in argument to get it
+to the last phrase ending.
+
+- It tells merlin the contents between the last phrase known to
+merlin and the argument
+
 - It continues until it finds the end of a phrase.
 
 The parameter `view-errors-p' controls whether we should care for errors"
   (merlin-delete-error-overlays)
-  (setq merlin-lock-point (merlin-retract-to point))
-  (merlin-tell-piece-split "struct" merlin-lock-point point)
-  (setq merlin-lock-point (merlin-tell-till-end-of-phrase))
-  (if (not (merlin-view-errors view-errors-p))
-      (let ((msg (current-message)))
-        (setq merlin-lock-point (merlin-seek merlin-lock-point))
-        (message msg)))
-  (merlin-update-overlay)
+  (save-excursion
+    (end-of-line)
+    (setq merlin-lock-point (merlin-retract-to (point)))
+    (merlin-tell-piece-split "struct" merlin-lock-point (point))
+    (setq merlin-lock-point (merlin-tell-till-end-of-phrase))
+    (if (not (merlin-view-errors view-errors-p))
+        (let ((msg (current-message)))
+          (setq merlin-lock-point (merlin-seek merlin-lock-point))
+          (message msg)))
+    (merlin-update-overlay))
 )    
   
-(defun merlin-point (view-errors-p)
-  "Tell merlin the lines up to the current point"
-  (interactive)
-  (merlin-update-point (point) view-errors-p)
-)
 (defun merlin-check-synchronize (&optional clean)
   "If merlin point is before the end of line send everything up to the end of line"
   (interactive)
   (let ((p merlin-lock-point))
     (if (> (point-at-eol) merlin-lock-point)
-        (merlin-update-point (point-at-eol) nil))
-    (if (and t (< merlin-lock-point p))
-        (merlin-update-point p nil))))
+        (merlin-update-point nil))))
 
 (defun merlin-edit (start end length)
   (if (< start merlin-lock-point)
       (progn
-        (message "muhaha")
-        (merlin-update-point start nil))))
+        (message "point: %d start! %d" (point) start)
+        (merlin-update-point nil))))
 ;; COMPLETION
 (defun merlin-extract-complete (prefix l)
   "Parses and format completion results"

  (interactive)
  (newline)
  (if merlin-continuous-feed
      (merlin-point nil))) 
(defun merlin-to-point ()
  "Updates the merlin to the current point, reporting error"
  (interactive)
  (merlin-point t))

;; Mode definition
(defvar merlin-mode-map

  (overlay-put merlin-error-overlay 'face 'next-error)
  (run-at-time "1 sec" nil 'merlin-remove-error-overlay)
  )

(defun merlin-delete-error-overlays ()
  "Removes error overlays"
