Definitions; added refresh and distance check.

Still bus tracking stuff.
distance check-> miles