Swap order of creating queue and parallel environment to fix crash.
Moved tests into separate directory and cleaned them up a bit.