The spatial reference support added

Also changed the way of deleting data source for the compatibility
reasons