Estimating the mean and covariance structure nonparametrically when the data are curves