Cleaned up code and use new interface FEM_Mesh_data().