Added AsyncTask class that acts as a threadpool and thread queue.