Refactoring shapefile support