Refactoring to split raster from vector layers