Remove the use of ThreadLocal for performance reasons