use round() for calculations and number_format() for presentation
fix two possible errors related to user mood, optimize retrieval
fix a rare l_avg bug that expected int instead of float