GPS refactor