Auto MAC detection, logging, some cleaning