Minor cleanup: splitted long function in gps_serial