Separated JavaScript to a single file.
Modified server to load new waypoints  from file at every position received. This will make it easier to edit waypoints later.