Here have some functions

unit:GetDistance()
And a global function FindUnit()