Part computing : Fix the total index computing and refactor users totals part
Refactor the code in multiple files