refactoring (ThreadLocal pattern for UIFactory)