Added some checks to shortest distance. Added help info.