Added Distance Tracking

The current distance tracking is not tested yet and still needs to be
looped into the rest of the code.