Repository controller

Completed first iteration (added all methods and tests)