Additional variable clean up and added shapeBasedSpatialJoin