Begining changes to the dispatching and threadpools

also removed commented out sections