Refactor to use Addr objects, and sets