Finish migration to optimize mongodb collections
Minor bugfix in statistics