many changes, fixed uvw to proper motion calculation and made random distance self consistent with model.
many changes, fixed uvw to proper motion calculation and made random distance self consistent with model.

ctheissen/LoKi