Almost finished the repository pattern