Remeake of my previous distances branch

Please check it out and provide your comments