More tidying - move stuff out of build function
Missed this on renaming ybd-artifacts