Minor fixes
Refactoring of the storage service and of the repositories.