Refactored the repositories

- Added specs
- Removed some unused methods
- Clean code
Merge pull request #24 from kreta-io/refactor/cleaning-and-testing-repositories

Refactored the repositories