Add factory and some methods