Removed switch statment in generateTree() by using a Hashtable to hold
the values instead. As a result code looks clearer.