Removing ThreadLocal and unused