Restructure boolean code to use one big private scope again.