Add thread / unwind refactorings.