Final restructure for the terrain layer