###Removes used scoreboard objectives and teams###
scoreboard objectives remove nitID
scoreboard objectives remove nitTemp
scoreboard objectives remove nitSiteCraft
scoreboard objectives remove nitCastleCraft
scoreboard objectives remove nitHellAttacks
scoreboard objectives remove nitResourceTime
scoreboard objectives remove nitResourceSpawn
scoreboard objectives remove nitTaxSpawn
scoreboard objectives remove nitSpreadLim
scoreboard objectives remove nitWarCraft
scoreboard objectives remove nitHellAttacks
scoreboard objectives remove nitBoxProg
scoreboard objectives remove nitPillarTier
scoreboard objectives remove nitInvadeProg
scoreboard objectives remove nitLightType
scoreboard objectives remove nitPostType
scoreboard objectives remove nitRaidProg
scoreboard objectives remove nitSuccess
execute as @e[type=enderman,team=nitFriendEnd] run data merge entity @s {Invulnerable:0}
team remove nitFriendEnd

###Removes unbreakable blocks found beneath/inside most/all structures###
execute as @e[tag=nitSite] at @s run fill ~-1 ~10 ~-1 ~1 ~30 ~1 minecraft:air replace minecraft:barrier
execute as @e[tag=nitDenizen] at @s run fill ~-10 ~-10 ~-10 ~10 ~20 ~10 minecraft:air replace minecraft:bedrock
execute as @e[tag=nitEndizen] at @s run fill ~-10 255 ~-10 ~10 255 ~10 minecraft:air replace minecraft:barrier

###Makes all villagers mortal again, but lets them stay persistent until the player decides to kill them###
execute as @e[tag=nitEntity,type=villager] run data merge entity @s {Invulnerable:0}
execute as @e[tag=nitEndizen] run data merge entity @e[type=enderman,distance=..2,limit=1] {Invulnerable:0}
execute as @e[tag=nitEndermollusk] run data merge entity @s {Invulnerable:0}

###Kills all relevant AOE clouds###
kill @e[tag=nitEntity,type=marker]