[WIP] Add repository manager

Also, why `getRepository()` is not in the interface?