Fixing MVC architecture problem.

This code fixes a problem in the MVC architecture that affects mainly the visualization module.