Minor bug on shape of array, 2.
Minor bug on shape of array, 3.
Solved many bugs and make it run safelly under the current conditions.
Adapted so that it is compatible with the output of the simulation
Change in the setup to compile the viewer.