Refactors Shapefile.