Repository implementation roughly done.