Added initial code to support CALayer.