Changind generator to iterator
Adding TODOs