Some cleanup of builder code