Distance calc and UI changes.