Improved config loading: the config for each entity is loaded on demand