Added support for top and bottom layer images