Use Thread.current instead class variables
Merge pull request #3 from sck-v/master

Use Thread.current instead class variables for base instance mode