Add map based threading and use multiprocessing.