Separated out build logic to facilitate validation against pdi-ee