Cleaned up damage detector

It was using some ugly code, cleaned it up and made it use
WireToolSetup.SetupLinking, should fix a lot of bugs