Restructure code for dataset evaluation to avoid duplicaiton. Preserve 2D coordinates.