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

...ams correctly.