Final version of serial. Needs debugging.