Power management

Simple merge for pm.h and pm.c, the power management module.