added rating model tests, and fixed some rating model bugs