Rebuilt with the better logic for choice elements and their children