clean up index.js, add test for gpxfile