Add interfaces for the repositories.
Add all missing tests