Hot fix for:
1) Deleteing nodes which do not have inputs and output links (terminal nodes) and links attached to them.
2) Not causing terminal error when encourtering profile for which no link or node exists in network.