Thread classes and Widget