Add notes and code for Threads class.