refactoring key lookup function.
Adding warning message before deleting referenced nodes
Derp. Removing all dpms.
fixing typo.