Added poweroff (and adjusted init to use it). Inlined function