Improved implementation of repository for DS.
Improved code for managing users.