Generator, iterator handling + tests
Fixed bloody memory leak
Merge branch 'generators'