Need help reducing the size of a code

you should not use Serial.print() if your GPS is connected to pin 0 and 1 (ie you have both the GPS and the Serial monitor open on the same line).

How is the GPS configured?

from your previous code you've disabled all the NMEA sentences and only get NAV-PVT so you've limited data flowing back.