clean up distance stuff a bit

try swapping the template and deprecation bits in case that is messing
things up.

relates #693