Update singletone and factory method patterns