Change API for clusters to nested dictionaries