A scala implementation of a KDTree