Update thread functions. Update README.