Initial implementation with nested dicts