Enumerators and iterators

WIP (nearly finished though)