Convert repository data structure from list to map