Turn nodogsplash back to multi-thread

This pull request should solve the problem of Issue #30.

I've just reverted the commit of Issue #9 without any conflict.
Then, solve the race conditions by turning static variables into local variables.