Add the constructor and static factory method.