Almost there now, need alternative to pthread_cancel() for final compile