Added Thread class

UNTESTED!