mark scripts executable, correct bugs in (commented out) optional distance calculation formats