Split out the larger segments of build().