Added prepfunction.R with updated call to child functions passing in params correctly.