Rename function get_sep_dist to dist_bisect. dist_bisect() outputs not only a distance matrix but also the spatial coordintes used to construct that distance matrix. Last change how spatial coordinates are ordered throughout the script so that they are consistent with out the function expand.grid() orders coordinates.