Class to calculate simple distance metrics