Javascript (coffeescript) Tree Template Engine