Worked some more on the float vs double issues. It runs fast now in float precision but there are remaining issues with running examples in double precision which need sorting (at least for the MBody1 model).