Changed iteration tracking to simple for loop. Changed magic distribution creation to use getattr instead of class.__dict__