Implemented the Repository and tests