Union find

Test improvements.