Issue #218, Add factory