Cleaned up the Set::contains() method