Repository controller

Added tests and implementations.
Synchronized with main repository.