Experiment with sorting by element and id

This project is currently in the "throw it at the wall and see if it
sticks" phase. It's a mess. I'm trying to work out a routine for
sorting the XML elements in a repeatable way.
Ignore Vim swap files
Clean up and add more print output
Add some output to study