All R fxns now together in single BAMMtools.R file