Added support for layer groups