Entirely rework thread pool to incorporate Shay's comments