Updated node search to remove duplicates and filter out node types