Adding support for layers