Refactor repository into domain model and implementation at infrastrcture
Add integration test for index service