Added class and function for matching nodes, separate function for exception/error info.