More cleanup and minor changes
Better handling of InterruptedException
Switching the threading to use a pool instead of creating new threads