thread if the user has actually requested it. Also changed some of the data types for the variables.
for creating new threads, deleting old thread, and generally managing the pool is done here.