Add source folders for IDE projects and properly kill pthreads