moved all globals to rhGlobals and power on autostart