Refactor GPS code review