improved doc and allowed shapefiles to be None