Debugging, and adding some features such as support for local threads.