refactor for casadi split modules