fixed #12 and optimized for flake8
rejected #15, canono XML isn't hierarchical.
here's the code I tried for future software archeologists.
Revert "rejected #15, canono XML isn't hierarchical."

This reverts commit a171c7268806f4e515be0662084a13e995acb1a1.