Clean up index view and created ratings_hash function