Add InMemoryRepository
Refactor some names