Removed unused ThreadLocal variables,
Added dependant method to Factory test.