Manifold Fitting, Embedding of Data, and Dimension Estimation