removed use of class variables to make jskit threadsafe