Added repository pattern