Added Linked list to manage started threads

This allows for deallocation of thread memory and removes a memory leak