1) move some functions to cpp files. 2) rewrite weights loading for TetMeshEmbeding.