Get MHD working, at least in 1d; had to fix more bugs in mesh.c