First draft of the power monitor. Incomplete.