Added implementation for Thread join.  Cleaned up implementation and sample code.