Moved an iterator to the matrixtemplate plugin, and added some other stuff to that plugin too.