tidying up code in shapefile class