Switched from Lists to Sets for dependency res