 
 (defun decrease-link-weight ()
     (interactive)
-    (let (
-        (key (current-line-link))
-	(weight (find-link-weight))
-	(sharability (find-link-sharability)))
-            (if key
-	        (set-properties key (- weight 0.25) sharability))))
+    (let ((link (current-link)))
+        (if link
+            (let (
+                (key (get-key link))
+                (weight (get-weight link))
+                (sharability (get-sharability link)))
+	                (set-properties key (- weight 0.25) sharability))
+	        (no-link))))
 
 (defun increase-link-weight ()
     (interactive)
-    (let (
-        (key (current-line-link))
-	(weight (find-link-weight))
-	(sharability (find-link-sharability)))
-            (if key
-	        (set-properties key (+ weight 0.25) sharability))))
+    (let ((link (current-link)))
+        (if link
+            (let (
+                (key (get-key link))
+                (weight (get-weight link))
+                (sharability (get-sharability link)))
+	                (set-properties key (+ weight 0.25) sharability))
+	        (no-link))))
 
 (defun decrease-target-weight ()
     (interactive)
-    (let (
-        (key (current-line-target))
-	(weight (find-target-weight))
-	(sharability (find-target-sharability)))
-            (if key
-	        (set-properties key (- weight 0.25) sharability))))
+    (let ((target (current-target)))
+        (if target
+            (let (
+                (key (get-key target))
+                (weight (get-weight target))
+                (sharability (get-sharability target)))
+	                (set-properties key (- weight 0.25) sharability))
+	        (no-target))))
 
 (defun increase-target-weight ()
     (interactive)
-    (let (
-        (key (current-line-target))
-	(weight (find-target-weight))
-	(sharability (find-target-sharability)))
-            (if key
-	        (set-properties key (+ weight 0.25) sharability))))
+    (let ((target (current-target)))
+        (if target
+            (let (
+                (key (get-key target))
+                (weight (get-weight target))
+                (sharability (get-sharability target)))
+	                (set-properties key (+ weight 0.25) sharability))
+	        (no-target))))
 
 (defun decrease-link-sharability ()
     (interactive)
-    (let (
-        (key (current-line-link))
-	(weight (find-link-weight))
-	(sharability (find-link-sharability)))
-            (if key
-		    (set-properties key weight (- sharability 0.25)))))
+    (let ((link (current-link)))
+        (if link
+            (let (
+                (key (get-key link))
+                (weight (get-weight link))
+                (sharability (get-sharability link)))
+		            (set-properties key weight (- sharability 0.25)))
+		    (no-link))))
 
 (defun increase-link-sharability ()
     (interactive)
-    (let (
-        (key (current-line-link))
-	(weight (find-link-weight))
-	(sharability (find-link-sharability)))
-            (if key
-		    (set-properties key weight (+ sharability 0.25)))))
+    (let ((link (current-link)))
+        (if link
+            (let (
+                (key (get-key link))
+                (weight (get-weight link))
+                (sharability (get-sharability link)))
+		            (set-properties key weight (+ sharability 0.25)))
+		    (no-link))))
 
 (defun decrease-target-sharability ()
     (interactive)
-    (let (
-        (key (current-line-target))
-	(weight (find-target-weight))
-	(sharability (find-target-sharability)))
-            (if key
-		    (set-properties key weight (- sharability 0.25)))))
+    (let ((target (current-target)))
+        (if target
+            (let (
+                (key (get-key target))
+                (weight (get-weight target))
+                (sharability (get-sharability target)))
+		            (set-properties key weight (- sharability 0.25)))
+		    (no-target))))
 
 (defun increase-target-sharability ()
     (interactive)
-    (let (
-        (key (current-line-target))
-	(weight (find-target-weight))
-	(sharability (find-target-sharability)))
-            (if key
-		    (set-properties key weight (+ sharability 0.25)))))
+    (let ((target (current-target)))
+        (if target
+            (let (
+                (key (get-key target))
+                (weight (get-weight target))
+                (sharability (get-sharability target)))
+		            (set-properties key weight (+ sharability 0.25)))
+		    (no-target))))
 
 
 ;; INTERFACE ;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun not-in-view ()
	(error-message "this command must be executed from within a view"))

(defun refresh-view ()
    (interactive)
    (if view-root


;; BUFFERS / VARIABLES ;;;;;;;;;;;;;;;;;

;; Buffer-local variables. Given them initial, global bindings so they're defined before there are actual view buffers.
(setq view-depth 3)
(setq view-root nil)
