Add factory for the new ui