Remove unneeded nodes from config