Added Validator class and isLeaf() to KnowledgeNode