 			sum += element.frequency
 			if sum >= target then return elementName
 	
-		# Returns the node of the probability tree (generate's "model" argument)
+		# Returns the node of the probability tree (generate()'s "model" argument)
 		# that represents the supplied sequence.  If no such node exists,
 		# returns null.
 	node = (sequence) ->

			unless result? then return null
		result
	
	result = ""
	parent = model
	
	until result.length >= maxLength or parent is null

	maxLength = 8
	currentModel = null
	
	capitalize = (string) ->
		if string.length > 0
			string[0].toUpperCase() + string.slice(1)
		else ""
	
	generateAndShow = ->
		$word.text capitalize generate maxLength, currentModel, n
