Multiple Thread classes

Copied-pasted from pid.py. Only imageA is actually useful.