Threadsafe ENV interaction

Closes #6