Serial cleanup, fixed Linux/Mac autodetect.