Added option to compare structures by CSS classnames; refactored the equals functions a bit