Fix the issue #291
Improve desing pattern
Improve GPX tests