Added support for nested key groups