Updated powersuspend and autosleep from @dorimanx branch