Added factories, dryed ou the tests