Added support for layouts