Made Repository Generic

rather than functions Generic