Adds toggle methods to layers and sublayers