Started implementing the repository pattern