Thanks for your comments. I significantly refactored and simplified the code,
added comments, added an isStructuredItem method. I hope it makes sense.
Your team Zorba Coders is subscribed to branch lp:zorba.
Mailing list: https://launchpad.net/~zorba-coders
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~zorba-coders
More help : https://help.launchpad.net/ListHelp