Struggling with doc. repr. and repeating elements (data structure?)
Tests with loops and random seq ordering for branching completed, fail on repeating doc elements.