Reorganization of the objects done.

Method compute_gen_imbalance done.
Unit test for the new methods and the moved one to be started.