Get threads.
Move stack-tracing functionality into thread class.