Aesthetic simplification
Fixed handling of cycles when doing tree formation