Changed Distance to be double instead of int
Make distance serialization culture-invariant