Not sure I really got the ending. But Ian McKellen was good.
The village is a mental place, existing in the group subconscious. With the death of his thought form son, #2 wanted to escape the village and return to the normal world ... and he wanted his wife with him ... so he needed replacements for both (himself as the magistrate and his wife, who was the architect). He knew number 6 wouldn't let harm come to the village's inhabitants, so he would step in and become #2.
The thing that bugs me though is it feels like some of the eps (specifically 3 & 4) were written by people who were trying to recreate the feel of the original series, which doesn't really logically follow with the reality of the village revealed at the end. Why would a subconscious school have a surveillance class? Or even surveillance equipment of the nature shown? The tech just didn't feel like it meshed.
And what happened to the people who died in the village? As shown, the wife didn't die, and wasn't kicked out either (unless that is part of why he needed a replacement). And the daughter of 147? What happened to her? She existed in the real world still, just separated by a court order. And the bombing in the first two eps really makes no sense at all considering the reality of the village ...
-Munch "not sure how well this would stand up to a rewatch" Wolf