integration refactoring

moveing the factory in the repository will add logic to the repository, and will make it harder for integration. if you want to reduce the count of the dependencies, we it can caombine the factory.create and the repository.save in an some creat( or register)   object that will be responsible for that.