Fixed issue where list entries weren't properly initialized if they were inserted into empty lists.
Added thread_sleep() and improved thread_exit().