fixed bugs

removed StructureTableReference.StructureIterator as it was a hassle to
do correctly. Just used a member generator function instead.