Add new methods and refactor in XML mesh loading.