Modularized the geojson writer