Added support for layers