Make the enumerated data a sequence so that the ordering is maintained.
Move to using logging module.
Whitespace clean up.
Fix a number of issues with the auto tests incorrectly tracking state and incorrect expected outcomes.