Create sorting routine for ids.
Update all inputs. Look at that in more details, ie with respect to control methods. When do we do update of inputs?
J=0 always in control method.


