Adding Repository Factories and Respository Provider. Still need refactor a lot