Procedural tree generation in coffeescript/javascript.