Create ppid node if needed
Remove nodes with no edges