Added support for optionally setting width and height properties