Algorithmic corrections

- Polygon track generation works much better (now the situation which resulted in strange behaviour makes the generation fail).
- Better checkpoint generation.
- Checkpoints are no longer missed.