added comments to the addDefinitionNode method (header only) and fixed up the prefix searching