Extract factories. Add services