First release of thread-juggling code. Apt to change