Moved serial code to os-serial