Test Speed-Up/Threading Bug Fix

Speeds up tests and fixes threading bug.