Added genX function for generating functional/time-varying covariates.