Updated the index controller to calculate rating and post data (WIP)