Refactor of the MeshGenerator and mesh loaders