Moved the functions variables into the buildApi calls and removed the cloneFunctions method