Did some refactoring work on the GPS api.