Added const where required to avoid using const_cast.
Added support for node turn on/off.