Use a better selector process, clean up duplicate keys