Bug fix
Distance cleanup
Merge pull request #93 from ly29/master

distance update