Replaced deprecated code except for FULL-WAKE-LOCK