   "Recursively expand a L-System grammar into a sequence of operations."
   [rules curr-state depth]
   (if (zero? depth)
-    curr-state 
+    curr-state
     (mapcat #(expand-l-system rules (rules % [%]) (dec depth)) curr-state)))
 
 (defn build-lsystem
   "Perform a sequence of L-System operations on a newly created mesh, return the result."
   [angle-fn grow-fn l-system]
-  (last (execute-ops angle-fn grow-fn [[(vec3 0 0 0)] [(vec3 0 0 0)] (gm/gmesh)] l-system)))
+  (g/center (last (execute-ops angle-fn grow-fn [[(vec3 0 0 0)] [(vec3 0 0 0)] (bm/basic-mesh)] l-system))))
 
 (defn algae
   "Returns a mesh generated by an L-System that produces something like algae, or a piece of parsley."
   []
-  (build-lsystem #(m/radians (+ (m/random -5 5) 35))
+  (build-lsystem #(m/radians (+ (m/random -15 15) 35))
                  #(grow-cuboid (m/random 2 4) %1 %2 %3)
-                 (expand-l-system {\F "F[&&+F]F[-\\F][-\\^F][&F][&+F]"} "F" 3)))
+                 (expand-l-system {\F "F[&&+F]F[-\\F][-\\^F][&F][&+F]"} "F" 4)))
 
 (defn koch
   "Returns a mesh generated by an L-System that produces 3D version of a Koch curve."
   []
-  (build-lsystem #(m/radians 90)
+  (build-lsystem (constantly (m/radians 90))
                  (partial grow-cuboid 3)
                  (expand-l-system {\F "FF-F-F&F-F-F+F"} "F" 3)))
 
 (defn toroid
   "Generates a toroid using the L-System support functions."
   []
-  (build-lsystem #(m/radians 15)
+  (build-lsystem (constantly (m/radians 15))
                  (partial grow-cuboid 4)
                  (take 48 (cycle [\F \+]))))

(ns geometer.lsystem
  (:require [thi.ng.geom.core        :as g]
            [thi.ng.geom.core.vector :refer [vec3]]
            [thi.ng.geom.cuboid      :refer [cuboid]]
            [thi.ng.geom.gmesh       :as gm]
            [thi.ng.geom.types.utils :as tu]
            [thi.ng.math.core        :as m]))


    \[ [(conj pos (last pos)) (conj rot (last rot)) mesh]
    \] (if (or (= 1 (count pos)) (= 1 (count rot))) ; guard against popping empties
         [pos rot mesh]
         [(pop pos) (pop rot) mesh])
    [pos rot mesh]))                                ; default to no-op

(defn execute-ops
