Refactoring based on RatingSGDFactorizer