Refactor 'surrounded regions'.