Debugged MX codegen, now working for simple example, #169