adding test for fixing disconnected componets

also includes a little cleanup in dcpart.cc