Removed spurious global var.
Changed to be able to read states from octave box calculation