Shrink scope of variables.
remove unneeded assignments.
PowerManager: complete init list.