Added mac address helper
cleaned up code