Bugfix of repository implementations

Bugfix of repository implementations, i should start versioning tests...