Merge pull request #3 from untitaker/python3

adaptions to datastructures
Fixed remaining iterating-related stuff.