A bit of refactoring to ensure we disposing of the ThreadLocal