Fixed makefile.
Added testcancel for proper termination.
fixed wrong usage of thread_ids --> changed to threads.

Finalized.