Rewrote the whole thing. Added distance calculator