Added the feature requested in issue 29: cleaning up improperly-nested elements.
Added the feature requested in issue 29: cleaning up improperly-nested elements.


enaeseth/loki,enaeseth/loki,enaeseth/loki