All working, tweaking distance weight fn usage.