Added code for building cumulative demographic dictionaries