Adding Thread-safe factories