Added support for changing state of services.