Refactoring gis - now working again