Init global threads

Fixes #13