Remove pthreads and fucntion pointers