remove unnecessary class variables from code to make gem threadsafe.