Updated Repository implementation