Bug fixed, few improvements applied and TODO items added in view of implementation of option "average"