made the inmemoryRepo completely generic without need for subclassing by making my own simplified version of clone();
refacorting... still ugly though :(