Improve field-gen code, fix one bug in mhd-forces, but not others