adding latlon/ computing distance etc. plus cleaning up some code (its still a mess but getting there)