added karma factorization

added prime factorization for user karma for all users
Fixed all the bugs