Minor cleanup on gps functions