more test improvements and edge cases. Repeat tests for generator with random selections.