Feature/worker arrays

Includes multithreading branch