Added index parameter to iterator fns interface; Changed the interface of iterator fns to receive a single object instead of four params; Updated and fixed comments