Rfactored recursive model building very slightly