Change iterator interface, added thread_sleep, stuff.