Move code for discovery addition