Fixing integ and unit tests. Adding primary factory back to iterator factory