Refactori repositories

by subclassing from Repo<T>.