Refactor machine power actions