! Fixed contains test being incorrect.
! Rewrote distance function to be more readable.
! Fixed sort function returning a True/False value instead of an integer value.
Merge pull request #2 from arneolavhal/fixes

Three fixes