Implemented exported factory method.