Refactored wakeonlan