A topic similar to this was made not too long ago: viewtopic.php?f=5&t=5630&sid=2c50661fd7a6d3d123014b971668e8c1&start=10
My suggestion, keep everything the same but add 3 new rules:
McGriddles wrote:1. The game will not allow you to close off a wall segment unless there is a gate on it
2. You don't need a key to leave an enclosed area.
3. Allow for players to delete wall segments if the gate is on their claim. This way you can just extend your claim to remove the walls.
Or you could allow players to pass through any gate that is on their claim without a key and make it so that only other players need a key to by-pass gates. You could also abstract keys altogether, suggested by Jackard.