Added typed key version of InMemoryRepository