Added validation to getListIterator functions
Added test for iterator and optimised iterator class
Code cleanup