Finish repository pattern