Refactor the serial code out into Serial.h/cpp