Refactoring of PLSA code, bug fix summing over wrong axis to normalize