Finished the shutdown/reboot functionality